Installing Kubernetes
Install Kubernetes on the management and compute nodes.
Procedure
- Configure the Kubernetes software source.
SSL verification is performed during software installation by default. Therefore, you need to disable SSL verification first. Add sslverify=false to the /etc/yum.conf file.cat > /etc/yum.repos.d/kubernetes.repo <<EOF [kubernetes] name=Kubernetes baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-aarch64/ enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg EOF
- Install the kubelet, Kubeadm, and kubectl components.
yum install -y kubelet-1.20.6 kubeadm-1.20.6 kubectl-1.20.6 cri-tools-1.24.0-0 kubernetes-cni-0.8.7-0

- Configure kubelet. In this example, configure kubelet to use containerd as the container runtime and set the cgroup driver to systemd.
cat > /etc/sysconfig/kubelet <<EOF KUBELET_EXTRA_ARGS=--cgroup-driver=systemd EOF
- Configure kubelet to automatically start upon system startup.
systemctl enable --now kubelet && systemctl restart kubelet
- Configure the CRL client tool crictl. In this example, configure crictl to use containerd as the container runtime.
cat > /etc/crictl.yaml <<EOF runtime-endpoint: unix:///run/containerd/containerd.sock image-endpoint: unix:///run/containerd/containerd.sock timeout: 10 debug: false EOF
Parent topic: Deploying the Kubernetes Cluster