Deploy a Production Ready Kubernetes Cluster
open sourceApache-2.0self-hostablefree
Kubespray is a set of Ansible playbooks and roles that install and upgrade highly available Kubernetes clusters on machines you already have: bare metal, AWS, GCE, Azure, OpenStack, vSphere, or Oracle Cloud Infrastructure (experimental). It uses kubeadm internally (since v2.3) for cluster creation and adds the OS configuration, etcd, a container runtime (containerd, Docker or experimental CRI-O) and a choice of ten network plugins, with Calico by default, Cilium, Flannel and others. It supports most popular Linux distributions, from Debian, Ubuntu and RHEL-family releases to Flatcar Container Linux and Fedora CoreOS, and can run from its container image, as an Ansible collection or with Vagrant. It's a Kubernetes SIG Cluster Lifecycle subproject under Apache-2.0.
Problems it solves
- install a highly available cluster on my own bare metal servers using Ansible, which my team already knows
- deploy the same cluster setup across on-prem VMware and two different clouds
- bootstrap a production cluster on existing Ubuntu, Debian or Rocky Linux servers over SSH
- set up a cluster in an air-gapped data center with no internet access, using our own mirrors
- upgrade every node of a self-managed cluster to a new Kubernetes version with a playbook
- add or remove worker nodes in an on-prem cluster without rebuilding it
- choose between Calico, Cilium, Flannel, Kube-OVN or Multus for pod networking when building a cluster
- plug cluster creation into our existing Ansible inventory and roles
- harden a self-built cluster and its etcd before an audit
- get MetalLB, cert-manager, Argo CD and a storage provisioner installed with the cluster on my own hardware
- run a dual-stack IPv4 and IPv6 cluster on servers in our own racks
Features
- deploys on AWS, GCE, Azure, OpenStack, vSphere, Oracle Cloud Infrastructure (experimental) or bare metal
- highly available clusters; composable choice of components
- uses kubeadm internally for cluster creation since v2.3
- ten network plugin options: Calico (default), Cilium, Flannel, Kube-OVN, Kube-router, Macvlan, Multus, custom CNI and more
- container runtimes: containerd, Docker, CRI-O (experimental)
- optional apps: cert-manager, CoreDNS, Argo CD, Helm, MetalLB, a container registry
- storage plugins: AWS EBS, Azure Disk, Cinder and GCP PD CSI drivers, local-path and local-volume provisioners
- supports Flatcar, Debian, Ubuntu, CentOS Stream/RHEL, Fedora, Fedora CoreOS, openSUSE, Oracle Linux, AlmaLinux and Rocky Linux
- air-gap (offline) installation, mirrors and a hardening guide
- runs from a container image, as an Ansible collection, or with Vagrant
View 2 more
- Terraform contrib scripts for provisioning infrastructure
- CI end-to-end tests across a matrix of distributions and plugins
Limitations
Alternatives
The same job
These do what Kubespray does.
- k0s The Simple, Solid & Certified Kubernetes Distribution
- Gardener Homogeneous Kubernetes clusters at scale on any infrastructure using hosted control planes.
- kOps The easiest way to get a production grade Kubernetes cluster up and running
- kubeadm Best-practice fast paths for creating Kubernetes clusters with kubeadm init and kubeadm join
- Cluster API Declarative APIs and tooling to simplify provisioning, upgrading and operating multiple Kubernetes clusters
- RKE2 Rancher's enterprise-ready next-generation Kubernetes distribution, focused on security and compliance
