curl -sSL https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl kubernetes-cni
# 添加 cgroup_enable=memory cgroup_memory=1
vi /boot/cmdline.txt
# 重启
reboot
# 如果有无法解决的报错,可以添加这个参数暂时跳过 --ignore-preflight-errors all
sudo kubeadm init
kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml
kubectl get nodes