Open heidemn opened 6 years ago
Did you deploy CNI pods? Flannel, weave...?
Calico seems to be deployed by default when following the instructions.
But only 1 of 4 Calico-related pods is running.
Further up, find the output of $ kubectl describe pod -n kube-system calico-etcd-rlqsz
.
Should I run any CNI-related commands which are not yet included in step-by-step guide?
NAME READY STATUS RESTARTS AGE
calico-etcd-rlqsz 0/1 Pending 0 43m
calico-kube-controllers-57c8947c94-wwnk2 1/1 Running 1 43m
calico-node-6gcjs 0/2 Pending 0 40m
calico-node-lfvcg 0/2 Pending 0 37m
I am also participant to the Istio workshop and frankly i did not need to deploy k8s following the first step as I already had my virtual cluster running on my mbp. Only calico controller manager seems to be running successfully and the CNI pods are pending (I am guessing calico-nodes) can you check their logs or do describe?
Looks nodes are not healthy and it can provoke the CNI plugin does not work. I saw the master describe and it looks fine can you send the kubectl describe node node1
output? Also ensure you have last vagrant and virtual box version.
If you still have problems, the workshop can be done using minikube or a cloud provider (GKE gives your 300€ free) if the internet connection allows us.
Vagrant and Virtual Box are the latest version.
OK thanks, good to know that Minikube works as well.
However, here is kubectl describe node node1
:
Name: node1
Roles: <none>
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/hostname=node1
Annotations: kubeadm.alpha.kubernetes.io/cri-socket: /var/run/dockershim.sock
node.alpha.kubernetes.io/ttl: 0
volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp: Sun, 11 Nov 2018 18:13:21 +0100
Taints: node.kubernetes.io/not-ready:NoSchedule
Unschedulable: false
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
OutOfDisk False Wed, 14 Nov 2018 09:11:50 +0100 Sun, 11 Nov 2018 18:13:20 +0100 KubeletHasSufficientDisk kubelet has sufficient disk space available
MemoryPressure False Wed, 14 Nov 2018 09:11:50 +0100 Sun, 11 Nov 2018 18:13:20 +0100 KubeletHasSufficientMemory kubelet has sufficient memory available
DiskPressure False Wed, 14 Nov 2018 09:11:50 +0100 Sun, 11 Nov 2018 18:13:20 +0100 KubeletHasNoDiskPressure kubelet has no disk pressure
PIDPressure False Wed, 14 Nov 2018 09:11:50 +0100 Sun, 11 Nov 2018 18:13:20 +0100 KubeletHasSufficientPID kubelet has sufficient PID available
Ready False Wed, 14 Nov 2018 09:11:50 +0100 Sun, 11 Nov 2018 18:13:20 +0100 KubeletNotReady runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Addresses:
InternalIP: 172.17.4.11
Hostname: node1
Capacity:
cpu: 1
ephemeral-storage: 10098468Ki
hugepages-2Mi: 0
memory: 2048148Ki
pods: 110
Allocatable:
cpu: 1
ephemeral-storage: 9306748094
hugepages-2Mi: 0
memory: 1945748Ki
pods: 110
System Info:
Machine ID: b5eb18503dc44d058e247b1dba973a39
System UUID: C9AB453C-FCBF-4361-9BCD-5B6B2DFDDBCE
Boot ID: 88686bae-3dcc-481d-af25-4911f0ab7a7c
Kernel Version: 4.4.0-138-generic
OS Image: Ubuntu 16.04.5 LTS
Operating System: linux
Architecture: amd64
Container Runtime Version: docker://17.3.2
Kubelet Version: v1.12.2
Kube-Proxy Version: v1.12.2
PodCIDR: 192.168.2.0/24
Non-terminated Pods: (4 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits
--------- ---- ------------ ---------- --------------- -------------
kube-system calico-kube-controllers-57c8947c94-wwnk2 0 (0%) 0 (0%) 0 (0%) 0 (0%)
kube-system coredns-576cbf47c7-hkwvn 100m (10%) 0 (0%) 70Mi (3%) 170Mi (8%)
kube-system coredns-576cbf47c7-qbmnp 100m (10%) 0 (0%) 70Mi (3%) 170Mi (8%)
kube-system kube-proxy-mm9m4 0 (0%) 0 (0%) 0 (0%) 0 (0%)
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
cpu 200m (20%) 0 (0%)
memory 140Mi (7%) 340Mi (17%)
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Starting 4m39s kubelet, node1 Starting kubelet.
Normal NodeHasSufficientDisk 4m39s kubelet, node1 Node node1 status is now: NodeHasSufficientDisk
Normal NodeHasSufficientMemory 4m39s kubelet, node1 Node node1 status is now: NodeHasSufficientMemory
Normal NodeHasNoDiskPressure 4m39s kubelet, node1 Node node1 status is now: NodeHasNoDiskPressure
Normal NodeHasSufficientPID 4m39s kubelet, node1 Node node1 status is now: NodeHasSufficientPID
Warning Rebooted 4m39s kubelet, node1 Node node1 has been rebooted, boot id: 88686bae-3dcc-481d-af25-4911f0ab7a7c
Normal NodeAllocatableEnforced 4m38s kubelet, node1 Updated Node Allocatable limit across pods
Normal Starting 4m31s kube-proxy, node1 Starting kube-proxy.
i think tolerations do not match taints. taints are
node.kubernetes.io/not-ready:NoSchedule
but tolerations in the etcd pods are
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
you can duplicate this taint (e.g. kubectl edit -n kube-system calico-node-
- effect: NoSchedule
key: node.kubernetes.io/not-ready
operator: Exists
this will work for calico-node and calico-etcd pods
(it will still result in master being notready)
@cy4n good catch! for some reason, it does not happen in my case, I will add it to a troubleshooting section
i'll add this to my GiantSwarm application. cough
I followed your instructions to set up an Ubuntu cluster on my Windows 10 laptop. https://github.com/pipo02mix/why_k8s_can_make_our_life_easier/tree/master/cluster/ubuntu
After running all commands listed there, I think the cluster is not yet ready in my case. Not all system pods are running, and I did not manage to succeed with the next step, to start the registry. Looking into the details, it seems like the CNI plugin is not properly initialized.
Do you have any advice what could be the problem here, and how get the cluster to work? Thanks...
Describing one of the pods shows me the message:
Warning NetworkNotReady 9s (x94 over 20m) kubelet, node1 network is not ready: [runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized]
Full output: