...
Code Block | ||||
---|---|---|---|---|
| ||||
sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo add-apt-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
#if the next step fails, verify that a file named /etc/apt/sources.list.d/kubernetes.list exists and contains this line: deb http://apt.kubernetes.io/ kubernetes-xenial main
sudo apt-get install kubelet kubeadm kubectl kubernetes-cni
# check that you have enough disk space under /var/lib/docker
# perform the preflight action
sudo kubeadm config images pull
#if the next step fails with an error about swap, do the following: sudo swapoff -a
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
kubectl taint nodes --all node-role.kubernetes.io/master- |
...