kubernetes-sigs /kubespray
Deploy a Production Ready Kubernetes Cluster
★ 18,842⑂ 6,935👁 295⑃ 9,037● 4,685▤ 82
More from this author
+2
Daily
+30
Weekly
+45
Monthly
18,842
stars
6,935
forks
295
watchers
9,037
prs
4,685
issues
82
releases
README
Deploy a Production Ready Kubernetes Cluster
!Kubernetes Logo
If you have questions, check the documentation at kubespray.io and join us on the kubernetes slack, channel \kubespray.
You can get your invite here
- Can be deployed on AWS, GCE, Azure, OpenStack, vSphere, Oracle Cloud Infrastructure (Experimental), or Baremetal
- Highly available cluster
- Composable (Choice of the network plugin for instance)
- Supports most popular Linux distributions
- Continuous integration tests
Quick Start
Below are several ways to use Kubespray to deploy a Kubernetes cluster.
Docker
Ensure you have installed Docker then
ShellSession
docker run --rm -it --mount type=bind,source="$(pwd)"/inventory/sample,dst=/inventory \
--mount type=bind,source="${HOME}"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \
quay.io/kubespray/kubespray:v2.31.0 bash
Inside the container you may now run the kubespray playbooks:
ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml
Ansible
Usage
See Getting started
Collection
See here if you wish to use this repository as an Ansible collection
Vagrant
For Vagrant we need to install Python dependencies for provisioning tasks.
Check that Python and pip are installed:
ShellSession
python -V && pip -V
If this returns the version of the software, you're good to go. If not, download and install Python from here
Install Ansible according to Ansible installation guide
then run the following step:
ShellSession
vagrant up
Documents
- Requirements
- Kubespray vs ...
- Getting started
- Setting up your first cluster
- Ansible inventory and tags
- Integration with existing ansible repo
- Deployment data variables
- DNS stack
- HA mode
- Network plugins
- Vagrant install
- Flatcar Container Linux bootstrap
- Fedora CoreOS bootstrap
- openSUSE setup
- Downloaded artifacts
- OpenStack
- vSphere
- Large deployments
- Adding/replacing a node
- Upgrades basics
- Air-Gap installation
- NTP
- Hardening
- Mirror
- Roadmap
Supported Linux Distributions
- Flatcar Container Linux by Kinvolk
- Debian Bookworm, Trixie
- Ubuntu 22.04, 24.04, 26.04
- CentOS Stream / RHEL 9, 10
- Fedora 39, 40, 41, 42
- Fedora CoreOS (see fcos Note)
- openSUSE Leap 16.x/Tumbleweed/MicroOS (containerd only; see openSUSE notes)
- Oracle Linux 9, 10
- Alma Linux 9, 10
- Rocky Linux 9, 10 (experimental in 10: see Rocky Linux 10 notes)
- Kylin Linux Advanced Server V10 (experimental: see kylin linux notes)
- Amazon Linux 2 (experimental: see amazon linux notes)
- UOS Linux (experimental: see uos linux notes)
- openEuler (experimental: see openEuler notes)
Note:
- Upstart/SysV init based OS types are not supported.
- Kernel requirements (please read if the OS kernel version is
- Core
- kubernetes 1.37.1
- etcd 3.7.2
- docker 28.3
- containerd 2.3.7
- cri-o 1.36.7 (experimental: see CRI-O Note. Only on fedora, ubuntu and centos based OS)
- Network Plugin
- cni-plugins 1.9.1
- calico 3.31.7
- cilium 1.20.4
-Top issues
#6242kube-apiserver stops working due to liveness probe fails, when kube_api_anonymous_auth is false28 comments · 2020-06-07#10682Migrate CI to prow (test-infra)26 comments · 2023-12-01#12383[CI] automate building OS images for supported/CI tested distribution23 comments · 2025-07-07#12731Publish a collection artifact22 comments · 2025-11-20#9094images for control plane are downloaded on compute nodes21 comments · 2022-07-15#11747Address CNI installation race condition 19 comments · 2024-11-25#11353kubespray should stop using the wording "master"17 comments · 2024-07-05#11711Changing loadbalancer_apiserver_localhost does not update "server: https://localhost:6443" in /etc/kubernetes/kubelet.conf14 comments · 2024-11-14
Latest release
v2.32.0 v2.32.0 2026-09-22Highlights - Kubernetes 1.36 is the default minor version - Ansible environment moves to Ansible 12 / ansible-core 2.19, with breaking changes to conditionals and templating. See Urgent Upgrade Notes before upgrading. - New operating system support includes Ubuntu 26.04, openSUSE Leap 16.0, and openSUSE MicroOS with containerd. Urgent Upgrade Notes (No, really, you MUST read this before you upgrade) - Ansible environment (action required): Kubespray now requires ansible-core =2.19.0,<2.20.0 and ships with Ansible 12. Before running playbooks, recreate or update the virtual envi