Member-only story
Kubespray Deployment with Custom Configurations
Kubernetes Versions, Container Runtime, CNI and Subnets
In the previous article, we deployed a Kubernetes using Kubespray without any custom settings. There are a lot of custom configuration you can do. Here, we show how to configure some of components.
We will show how to change the following configurations.
- Kubernetes versions
- Container Runtime
- CNI (Container Network Interface)
- Subnets for services and pods
All of these components can be configured in the k8s-cluster.yml. This file is located in the inventory/[cluster]/group_vars/k8s_cluster directory.
Kubernetes versions
In the k8s-cluster.yml file, there is kube_version key. The default version is specified. For examples, Kubernetes v1.26.11 in Kubespray version 1.22.2 and Kubernetes v1.30.4 in Kubespray version 1.26.0. The supported Kubernetes versions for each Kubespray version can be found in the release documentation.
Container Runtime
The default container manager is containerd. There are two more options for the container runtime: docker and cri-o. Find container_manager key and change its value to the desired runtime. Since Kuberntes dropped docker support, you may choose between containerd and cri-o. The value for cri-o is crio.