All-in-One Kubernetes Installation¶
An All-in-One Kubernetes Installation allows for the deployment of both Kubernetes and KubeSphere on a single Linux node.^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md] This method is designed to be simple and efficient, utilizing a tool called KubeKey to automate the setup process.
Prerequisites¶
Before starting the installation, the system requires specific network and container packages to be installed.^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md] The necessary dependencies include ebtables, socat, ipset, and conntrack.^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]
It is also critical to ensure the network interface is configured correctly with a static IP address.^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]
Installation Steps¶
1. Install Dependencies¶
Install the required operating system packages using yum.^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]
yum install -y ebtables socat ipset conntrack
2. Download KubeKey¶
KubeKey is the installer used to deploy the cluster.^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md] Download the latest version (e.g., v1.2.0) and make the binary executable^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]:
curl -sfL https://get-kk.kubesphere.io | VERSION=v1.2.0 sh -
chmod +x kk
3. Create the Cluster¶
Run the KubeKey (kk) command to create a cluster with specific versions of Kubernetes and KubeSphere^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]:
./kk create cluster --with-kubernetes v1.21.5 --with-kubesphere v3.2.0
The tool will perform an environment check to verify requirements such as sudo, curl, and openssl availability^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]. Upon confirmation, it downloads necessary binaries like kubeadm and kubelet and proceeds with the installation^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md].
Post-Installation¶
Once the installation is complete, access credentials and the console URL are displayed^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]. You can verify the status of the installation by checking the logs of the installation job^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]:
- Console:
http://192.168.100.128:30880 - Account:
admin - Password:
P@88w0rd
Verification Command¶
To ensure the system is running correctly, follow the log output of the installer pod^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]:
[kubectl](<./kubectl.md>) logs -n kubesphere-system $([kubectl](<./kubectl.md>) get [Pod](<./pod.md>) -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
Related Concepts¶
- Kubernetes
- [[KubeSphere]]
- KubeKey
Sources¶
^[400-devops__06-Kubernetes__k8s-learning__99.k8s-all-in-one__README.md]