0
votes

I'm starting a Kubernetes cluster of 3 nodes (1 master, 2 worker)

Trying to go by steps described in Ansible playbook - https://gitlab.com/LinarNadyrov/gcp/tree/master

Applying playbook steps 1,2,3 consequentially

After than, I connect to master to check status:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

NAME STATUS ROLES AGE VERSION

master NotReady master 17m v1.13.0

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

enter link description here

kubectl get pods -n kube-system

NAME READY STATUS RESTARTS AGE

coredns-86c58d9df4-7jc4b 0/1 Pending 0 3h45m

coredns-86c58d9df4-929xf 0/1 Pending 0 3h45m

etcd-officemasterkub 1/1 Running 2 7h26m

kube-apiserver-officemasterkub 1/1 Running 2 7h26m

kube-controller-manager-officemasterkub 1/1 Running 2 7h26m

kube-flannel-ds-5jhbx 0/1 Pending 0 7h20m

kube-flannel-ds-wqfvs 0/1 Pending 0 7h20m

kube-proxy-gmngj 1/1 Running 2 7h27m

kube-proxy-ppbqp 1/1 Running 1 7h20m

kube-proxy-r2rn6 1/1 Running 1 7h20m

kube-scheduler-officemasterkub 1/1 Running 2 7h26m

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Status is NotReady

Could anyone help me with it? What's the problem? What should be done to fix it? Maybe I missed something?

Thanx in advance!

1
Could you please check kubectl get pods -n kube-system ?Prafull Ladha
You flannel pods are in pending state. Those are the k8s CNI pods without those k8s nodes will not able to connect to each other. Hence you node is in not ready state.Prafull Ladha
Describe the flannel pod kubectl describe pod kube-flannel-ds-5jhbxPrafull Ladha
Thank you for the answer. What do you need to do to run CNI?Линар Надыров

1 Answers

0
votes

Линар Надыров the problem here is with your flannel yaml file. You did not specify any resources in the DaemonSet so there are no flannel pods spawning.

I did not check any further as it was enough reason why is this issue occurring. You can use this yaml if this is for testing purposes. Or edit your accordingly to the provided example.

In your file change the line 43 to:

shell: kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml >> pod_network_setup.txt

You can find more about DaemonSets here.