18,827
stars
+15+18+40
6,943
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions
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
-