- 방화벽 port가 오픈 되어 있는지 확인 합니다.
- Master node
- TCP - Inbound - 6443 : Kubernetes API Server
- TCP - Inbound - 2379~2380: Etcd server client API (used by kube-apiserver, etcd)
- TCP - Inbound - 10250: Kubelet API (used by Self, Control plane)
- TCP - Inbound - 10251: kube-scheduler (used by Self)
- TCP - Inbound - 10252: kube-controller-manager (used by Self)
- Worker node
- TCP - Inbound - 10250: Kubelet API (used by Self, Control plane)
- TCP - Inbound - 30000~32767: NodePort Services (used by All)
- UDP(All node)
- 8285, 8472
- Master node
sudo -i
sh kubeadm_install.sh
user에서는 쓰지 마세요
export KUBECONFIG=/etc/kubernetes/admin.conf
kubectl taint nodes --all node-role.kubernetes.io/master-
kubectl create -f https://projectcalico.docs.tigera.io/manifests/tigera-operator.yaml
kubectl create -f https://projectcalico.docs.tigera.io/manifests/custom-resources.yaml
- 또는 wget https://docs.projectcalico.org/manifests/calico.yaml 명령어로 calico.yaml다운로드 후 apply
- worker join
- kubeadm_worker_install.sh를 이용해 kubectl, kubelet, kubeadm을 설치 후 master의 join명령어로 join합니다.
- 10.244.0.0/16 를 cidr로 해주어야 합니다.
- kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
join command가 나오게 하는 명령어 입니다.
kubeadm token create --print-join-command
- 실행 하기 전에 host에 controlplane이 추가 되어 있는지 확인 합니다 /etc/hosts
kubeadm_worker_install.sh
docker info | grep -i cgroup
"Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"cgroupfs\" is different from docker cgroup driver: \"systemd\"
위 메세지 나오면서 kubelet이 실행 안되는 경우
위 메세지에서 안넘어가고 Timeout이 나는 경우는 6443포트와 통신이 안되기 때문일 수 있습니다. 6443포트를 열어 주시면 됩니다.