KubeKey¶
KubeKey (often abbreviated as kk) is an installation tool and toolkit designed for setting up Kubernetes and [[KubeSphere]] clusters.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md]
It allows users to deploy both the container orchestration platform and the cloud-native operating system on Linux environments efficiently.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md]
Installation and Prerequisites¶
Before using KubeKey, the source material indicates that certain network packages must be installed on the target Linux machine, such as ebtables, socat, ipset, and conntrack.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:18-19]
The binary can be downloaded directly from the project's repository using a curl command.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:26-27] After download, the binary requires execution permissions (e.g., chmod +x kk) to run.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:29]
Creating a Cluster¶
The primary function of kk is the create cluster command.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:32]
This command accepts arguments to specify the versions of the software to be installed; for example, --with-kubernetes and --with-kubesphere.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:32]
Pre-flight Checks¶
Upon execution, KubeKey performs a simple check of the environment to ensure the machine meets specific requirements.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:37-38]
This check verifies the presence of necessary utilities like sudo, curl, openssl, and the network packages mentioned earlier, as well as storage clients like nfs and glusterfs.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:33-34]
Downloading Binaries¶
After the user confirms the installation, KubeKey proceeds to download the necessary installation files, such as kubeadm and kubelet.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:50-51]
Verification and Access¶
Once the installation process is complete, KubeKey provides access information for the [[KubeSphere]] console, including the IP address, port, default account, and password.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:58-61]
To verify the status of the service components post-installation, users can utilize kubectl to check the logs of the installation Pod within the kubesphere-system namespace.^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md:67-68]
Sources¶
^[400-devops-06-kubernetes-k8s-learning-99k8s-all-in-one-readme.md]