23
Nov
Import the GPG public key of the Alibaba Cloud image curl -fsSL https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/kubernetes-archive-keyring.gpg sudo apt-get update Check /etc/apt/sources.list.d/kubernetes.list configuration sudo rm -f /etc/apt/sources.list.d/kubernetes.list echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list Update and install Kubernetes sudo apt-get update sudo apt-get install -y kubelet kubeadm kubectl Confirm whether the installation is successful kubelet --version kubeadm version kubectl version --client Disable Swap (if not disabled) sudo swapoff -a sudo sed -i '/swap/d' /etc/fstab Initialize the Kubernetes cluster. Run the following command to initialize the Kubernetes master node: sudo kubeadm init --pod-network-cidr=192.168.0.0/16 Set up kubectl…