Overlay

Kubernetes Setting

[All nodes]

sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add –
sudo su
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
exit
sudo apt-get update
sudo apt-get install -y docker.io
sudo apt-get install -y kubelet kubeadm kubectl kubernetes-cni

 

[Master nodes]
sudo kubeadm init
-> Save join command from result : sudo kubeadm join –token [##] [master IP:Port]

 

mkdir -p $HOME/.kube
sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf

 

kubectl apply -f calico.yaml
kubectl get node
watch kubectl get pods –all-namespaces
-> After all pods runs
kubectl create -f kubernetes-dashboard.yaml

 

yaml files: yaml

 

[Minion nodes]
sudo kubeadm join –token [##] [master IP:Port]

 

[Trouble Shooting]
* Node Not Read
Remove the environment variable $KUBELET_NETWORK_ARGS in the system file : /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
“systemctl daemon-reload”
“kubeadm init”
* Forgot Token
“kubeadm token generate”

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다