Kubernetes - does not start the role of master

12/7/2018

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!

-- Линар Надыров
kubectl
kubernetes
roles

1 Answer

12/10/2018

Линар Надыров 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.

-- aurelius
Source: StackOverflow