Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA 🔥🐳
Go to file
Mr-Mu b64db7134d
bugfix: Push Image Credential (#2879)
2025-12-02 15:20:59 +08:00
.github feat: change downloadKubekey.sh and workflow (#2848) 2025-11-11 09:28:27 +08:00
api fix: change builtin/core architectures (#2718) 2025-08-22 21:59:40 +08:00
build Uninstall docker interface (#2478) 2025-03-05 18:55:12 +08:00
builtin bugfix: Push Image Credential (#2879) 2025-12-02 15:20:59 +08:00
cmd bugfix: Push Image Credential (#2879) 2025-12-02 15:20:59 +08:00
config fix: more clear error (#2694) 2025-08-12 03:07:45 +00:00
docs feat: image module add copy func (#2868) 2025-11-28 13:32:00 +08:00
exp feat: kubekey gitops 2024-01-05 15:14:36 +08:00
hack feat: add export copy func (#2875) 2025-11-28 15:58:00 +08:00
kubernetes-app Uninstall docker interface (#2478) 2025-03-05 18:55:12 +08:00
pkg fix: some failed version check when create cluster (#2877) 2025-12-01 11:04:46 +00:00
plugins feat: More detailed init-os rules (#2563) 2025-05-13 09:25:01 +00:00
scripts feat: install image_registry (#2640) 2025-06-26 17:48:18 +08:00
version feat: update release configuration and add download script (#2815) 2025-10-20 18:45:43 +08:00
.dockerignore Uninstall docker interface (#2478) 2025-03-05 18:55:12 +08:00
.gitignore Uninstall docker interface (#2478) 2025-03-05 18:55:12 +08:00
.go-version Uninstall docker interface (#2478) 2025-03-05 18:55:12 +08:00
.golangci.yaml feat: enhance precheck tasks for image registry and network validation (#2676) 2025-08-04 15:27:22 +08:00
.goreleaser.yaml feat: update release configuration and add download script (#2815) 2025-10-20 18:45:43 +08:00
CONTRIBUTORS.md feat: kubekey gitops 2024-01-05 15:14:36 +08:00
LICENSE feat: kubekey gitops 2024-01-05 15:14:36 +08:00
Makefile refactor: replace custom decode function with runtime.DecodeInto for improved error handling in fileStorage (#2822) 2025-10-24 14:35:23 +08:00
OWNERS Update OWNERS 2025-08-19 10:35:27 +08:00
README.md A small fix in README files - the --ui-path key was specified using a single hyphen (#2818) 2025-10-21 09:44:51 +08:00
README_zh-CN.md A small fix in README files - the --ui-path key was specified using a single hyphen (#2818) 2025-10-21 09:44:51 +08:00
go.mod feat: enhance precheck tasks for image registry and network validation (#2676) 2025-08-04 15:27:22 +08:00
go.sum feat: add web api (#2591) 2025-05-26 09:36:13 +00:00

CI

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

Comparison of new features in 3.x

  1. Expanded from Kubernetes lifecycle management tool to task execution tool (flow design refers to Ansible)
  2. Supports multiple ways to manage task templates: git, local, etc.
  3. Supports multiple node connection methods, including: local, ssh, kubernetes, prometheus.
  4. Supports cloud-native automated batch task management
  5. Advanced features: UI page (not yet open)

Install kubekey

Install in Kubernetes

Install kubekey via helm.

helm upgrade --install --create-namespace -n kubekey-system kubekey config/kubekey

Binary

Get the corresponding binary files from the release page.

Download Binary with UI

UI only support after v4.0.0

VERSION=v4.0.0 WEB_INSTALLER_VERSION=v1.0.0 hack/downloadKubekey.sh
# run with UI
kk web --schema-path schema --ui-path dist

If there is a config.yaml file in the current directory, running ./package.sh config.yaml to build an offline package.

Deploy Kubernetes

  • 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

Requirements

  • 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.

Define node information

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:

  1. k8s_cluster: Kubernetes cluster. Contains two subgroups: kube_control_plane, kube_worker
  2. kube_control_plane: control_plane node group in the Kubernetes cluster
  3. kube_worker: worker node group in the Kubernetes cluster.
  4. etcd: node group for installing etcd cluster.
  5. image_registry: node group for installing image registry (including harbor, registry)
  6. nfs: node group for installing nfs.

Define key configuration information

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:

Install cluster

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.

Documentation

Project template writing specification
Template syntax
Parameter definition
Cluster management