existing workflows and test suites written in Go • Better cluster lifecycle control and improved error handling @xmudrii Why use Go for running clusters?
On local machines or on public cloud? • Do we need multi-node or High-Availability support? • What Kubernetes version we want to run? • For which cloud provider we need support? @xmudrii Choosing a right solution
on local clusters reduces costs and makes tests faster ◦ In CI environment, we want an easy way to create and control clusters • When building end user tools ◦ Cluster-API CLI (clusterctl) uses Minikube to run a cluster @xmudrii When do we need local clusters?
◦ Dependencies should be common that most users already have • It would be nice if we could run our clusters inside Docker containers ◦ Many users already have Docker installed ◦ Docker doesn’t requires root privileges or changes files on the system @xmudrii Prerequisites
Docker • Maintained by Kubernetes community • Supports Kubernetes 1.11+, including running Kubernetes from sources • Comes with a CLI, but can also be used as a Go library @xmudrii kind (Kubernetes in Docker)
• Requires just Docker, making it well suitable for end users and CI pipelines ◦ Comes with pre-built Docker image containing all dependencies • Uses popular kubeadm, making clusters easily customizable • Supports multi-node clusters, HA support expected in the upcoming period @xmudrii Why kind?
Backwards-incompatible changes are announced in upcoming period ◦ It is recommended to vendor and pin kind to specific commit! • High-availability support is work-in-progress • Image sideloading has to be done manually, but a native feature is WIP @xmudrii Project status
• There are many cloud providers, many possible setups, and many tasks to do ◦ Setting up networking, creating VMs, bootstrapping them… • Sometimes it’s not possible to catch up all bugs when testing locally ◦ Example: GCP authorization plugin _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" @xmudrii Running clusters on the Cloud
Optionally, implementing cloud provider support should be possible • Cluster provisioning process is customizable ◦ We can tell what resources we need ◦ We can tell how to provision the VMs and Kubernetes • There is a secure mechanism for cleaning up resources @xmudrii Prerequisites
framework, or CLI • Support many cloud providers ◦ AWS, GCP, DigitalOcean, Azure, OpenStack, Packet • Support (almost) any Kubernetes version • Machines and cluster provisioning is customizable @xmudrii Why Kubicorn?
the upstream Cluster-API ◦ Breaking changes may happen in the future • Support for AWS, DigitalOcean, GCP, Azure, OpenStack and Packet ◦ Azure support is not fully implemented ◦ OpenStack and GCP are known to have some bugs @xmudrii Project status
• Using kind for running local clusters • Using Kubicorn for running clusters on many cloud providers • Repository with resources: http://bit.ly/k8s-with-go • Twitter/GitHub/Slack: @xmudrii • Blog: https://xmudrii.com @xmudrii Conclusion