English | δΈζ
π Welcome to KubeKey!
KubeKey is an open-source lightweight task flow execution tool. It provides a flexible and fast way to install Kubernetes.
KubeKey has passed the CNCF Kubernetes Conformance Certification
- Expanded from Kubernetes lifecycle management tool to task execution tool (flow design refers to Ansible)
- Supports multiple ways to manage task templates: git, local, etc.
- Supports multiple node connection methods, including: local, ssh, kubernetes, prometheus.
- Supports cloud-native automated batch task management
- Advanced features: UI page (not yet open)
Install kubekey via helm.
helm upgrade --install --create-namespace -n kubekey-system kubekey config/kubekey
Get the corresponding binary files from the release page.
-
Supported deployment environments: Linux distributions
- almaLinux: 9.0 (not fully tested)
- centOS: 8
- debian: 10, 11
- kylin: V10SP3 (not fully tested)
- ubuntu: 18.04, 20.04, 22.04, 24.04.
-
Supported Kubernetes versions: v1.23.x ~ v1.33.x
- One or more computers running Linux operating systems compatible with deb/rpm; for example: Ubuntu or CentOS.
- Each machine should have more than 2 GB of memory; applications will be limited if memory is insufficient.
- Control plane nodes should have at least 2 CPUs.
- Full network connectivity among all machines in the cluster. You can use public or private networks.
kubekey uses the inventory
resource to define node connection information.
You can use kk create inventory
to get the default inventory.yaml resource. The default inventory.yaml
configuration is as follows:
apiVersion: kubekey.kubesphere.io/v1
kind: Inventory
metadata:
name: default
spec:
hosts: # your can set all nodes here. or set nodes on special groups.
# node1:
# connector:
# type: ssh
# host: node1
# port: 22
# user: root
# password: 123456
groups:
# all kubernetes nodes.
k8s_cluster:
groups:
- kube_control_plane
- kube_worker
# control_plane nodes
kube_control_plane:
hosts:
- localhost
# worker nodes
kube_worker:
hosts:
- localhost
# etcd nodes when etcd_deployment_type is external
etcd:
hosts:
- localhost
# image_registry:
# hosts:
# - localhost
# nfs nodes for registry storage. and kubernetes nfs storage
# nfs:
# hosts:
# - localhost
The inventory contains the following built-in groups:
- k8s_cluster: Kubernetes cluster. Contains two subgroups: kube_control_plane, kube_worker
- kube_control_plane: control_plane node group in the Kubernetes cluster
- kube_worker: worker node group in the Kubernetes cluster.
- etcd: node group for installing etcd cluster.
- image_registry: node group for installing image registry (including harbor, registry)
- nfs: node group for installing nfs.
kubekey uses the config
resource to define node connection information.
You can use kk create config --with-kubernetes v1.33.1
to get the default inventory.yaml resource. The default config.yaml
configuration is as follows:
Default config configurations are provided as references for different Kubernetes versions:
- Config for installing Kubernetes v1.23.x
- Config for installing Kubernetes v1.24.x
- Config for installing Kubernetes v1.25.x
- Config for installing Kubernetes v1.26.x
- Config for installing Kubernetes v1.27.x
- Config for installing Kubernetes v1.28.x
- Config for installing Kubernetes v1.29.x
- Config for installing Kubernetes v1.30.x
- Config for installing Kubernetes v1.31.x
- Config for installing Kubernetes v1.32.x
- Config for installing Kubernetes v1.33.x
kk create cluster -i inventory.yaml -c config.yaml
If -i inventory.yaml
is not provided, the default inventory.yaml is used. Kubernetes will only be installed on the executing machine.
If -c config.yaml
is not provided, the default config.yaml is used. Installs Kubernetes version v1.33.1.
Project template writing specification
Template syntax
Parameter definition
Cluster management