Saturday, 8 August 2020

kubectl get nodes NotReady

 Got this error: 


[root@unica12master .kube]# kubectl get nodes

NAME                        STATUS     ROLES    AGE   VERSION

unica12master.localdomain   NotReady   master   11m   v1.18.6

unica12node1.localdomain    NotReady   <none>   11m   v1.18.6

unica12node2.localdomain    NotReady   <none>   10m   v1.18.6




Upon checking: alse reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized (ned to install weave). See : https://stackoverflow.com/questions/52675934/network-plugin-is-not-ready-cni-config-uninitialized
(do this on the msater only)
$ export kubever=$(kubectl version | base64 | tr -d '\n')
$ kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$kubever"
[root@unica12master .kube]# kubectl describe nodes
Name:               unica12master.localdomain
Roles:              master
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/arch=amd64
                    kubernetes.io/hostname=unica12master.localdomain
                    kubernetes.io/os=linux
                    node-role.kubernetes.io/master=
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, 09 Aug 2020 05:49:34 +0800
Taints:             node-role.kubernetes.io/master:NoSchedule
                    node.kubernetes.io/not-ready:NoSchedule
Unschedulable:      false
Lease:
  HolderIdentity:  unica12master.localdomain
  AcquireTime:     <unset>
  RenewTime:       Sun, 09 Aug 2020 05:59:53 +0800
Conditions:
  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  MemoryPressure   False   Sun, 09 Aug 2020 05:59:44 +0800   Sun, 09 Aug 2020 05:49:31 +0800   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Sun, 09 Aug 2020 05:59:44 +0800   Sun, 09 Aug 2020 05:49:31 +0800   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure      False   Sun, 09 Aug 2020 05:59:44 +0800   Sun, 09 Aug 2020 05:49:31 +0800   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready            False   Sun, 09 Aug 2020 05:59:44 +0800   Sun, 09 Aug 2020 05:49:31 +0800   KubeletNotReady              runtime network not ready: NetworkReady=f                                                                        alse reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Addresses:
  InternalIP:  192.168.1.151
  Hostname:    unica12master.localdomain
Capacity:
  cpu:                2
  ephemeral-storage:  49250820Ki
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             3880732Ki
  pods:               110
Allocatable:
  cpu:                2
  ephemeral-storage:  45389555637
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             3778332Ki
  pods:               110
System Info:
  Machine ID:                 44cfb44606f9476bb54c62a10588dcd1
  System UUID:                A6554D56-C05F-515D-BD13-8D20A4DEAEF1
  Boot ID:                    033a9b2d-82eb-483c-a603-edec28fc35ac
  Kernel Version:             3.10.0-957.el7.x86_64
  OS Image:                   Red Hat Enterprise Linux
  Operating System:           linux
  Architecture:               amd64
  Container Runtime Version:  docker://1.13.1
  Kubelet Version:            v1.18.6
  Kube-Proxy Version:         v1.18.6
Non-terminated Pods:          (5 in total)
  Namespace                   Name                                                 CPU Requests  CPU Limits  Memory Requests  Memory Limits  AGE
  ---------                   ----                                                 ------------  ----------  ---------------  -------------  ---
  kube-system                 etcd-unica12master.localdomain                       0 (0%)        0 (0%)      0 (0%)           0 (0%)         10m
  kube-system                 kube-apiserver-unica12master.localdomain             250m (12%)    0 (0%)      0 (0%)           0 (0%)         10m
  kube-system                 kube-controller-manager-unica12master.localdomain    200m (10%)    0 (0%)      0 (0%)           0 (0%)         10m
  kube-system                 kube-proxy-bgb9q                                     0 (0%)        0 (0%)      0 (0%)           0 (0%)         10m
  kube-system                 kube-scheduler-unica12master.localdomain             100m (5%)     0 (0%)      0 (0%)           0 (0%)         10m
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests    Limits
  --------           --------    ------
  cpu                550m (27%)  0 (0%)
  memory             0 (0%)      0 (0%)
  ephemeral-storage  0 (0%)      0 (0%)
  hugepages-1Gi      0 (0%)      0 (0%)
  hugepages-2Mi      0 (0%)      0 (0%)
Events:
  Type    Reason                   Age                From                                   Message
  ----    ------                   ----               ----                                   -------
  Normal  NodeHasSufficientMemory  10m (x4 over 10m)  kubelet, unica12master.localdomain     Node unica12master.localdomain status is now: NodeHasSufficientMemory
  Normal  NodeHasNoDiskPressure    10m (x4 over 10m)  kubelet, unica12master.localdomain     Node unica12master.localdomain status is now: NodeHasNoDiskPressure
  Normal  NodeHasSufficientPID     10m (x4 over 10m)  kubelet, unica12master.localdomain     Node unica12master.localdomain status is now: NodeHasSufficientPID
  Normal  Starting                 10m                kubelet, unica12master.localdomain     Starting kubelet.
  Normal  NodeAllocatableEnforced  10m                kubelet, unica12master.localdomain     Updated Node Allocatable limit across pods
  Normal  NodeHasSufficientMemory  10m                kubelet, unica12master.localdomain     Node unica12master.localdomain status is now: NodeHasSufficientMemory
  Normal  NodeHasNoDiskPressure    10m                kubelet, unica12master.localdomain     Node unica12master.localdomain status is now: NodeHasNoDiskPressure
  Normal  NodeHasSufficientPID     10m                kubelet, unica12master.localdomain     Node unica12master.localdomain status is now: NodeHasSufficientPID
  Normal  Starting                 10m                kube-proxy, unica12master.localdomain  Starting kube-proxy.


Name:               unica12node1.localdomain
Roles:              <none>
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/arch=amd64
                    kubernetes.io/hostname=unica12node1.localdomain
                    kubernetes.io/os=linux
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, 09 Aug 2020 05:50:13 +0800
Taints:             node.kubernetes.io/not-ready:NoSchedule
Unschedulable:      false
Lease:
  HolderIdentity:  unica12node1.localdomain
  AcquireTime:     <unset>
  RenewTime:       Sun, 09 Aug 2020 05:59:53 +0800
Conditions:
  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  MemoryPressure   False   Sun, 09 Aug 2020 05:55:43 +0800   Sun, 09 Aug 2020 05:50:13 +0800   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Sun, 09 Aug 2020 05:55:43 +0800   Sun, 09 Aug 2020 05:50:13 +0800   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure      False   Sun, 09 Aug 2020 05:55:43 +0800   Sun, 09 Aug 2020 05:50:13 +0800   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready            False   Sun, 09 Aug 2020 05:55:43 +0800   Sun, 09 Aug 2020 05:50:13 +0800   KubeletNotReady              runtime network not ready: NetworkReady=f                                                                        alse reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Addresses:
  InternalIP:  192.168.1.152
  Hostname:    unica12node1.localdomain
Capacity:
  cpu:                6
  ephemeral-storage:  49250820Ki
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             16266432Ki
  pods:               110
Allocatable:
  cpu:                6
  ephemeral-storage:  45389555637
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             16164032Ki
  pods:               110
System Info:
  Machine ID:                 81ea4d0c7f724822b21c1dc2f071bf77
  System UUID:                35FE4D56-2DF2-1860-9B73-16F895B11091
  Boot ID:                    a90cd1a4-44de-4ef4-96c0-19ef9fbf8cd1
  Kernel Version:             3.10.0-957.el7.x86_64
  OS Image:                   Red Hat Enterprise Linux
  Operating System:           linux
  Architecture:               amd64
  Container Runtime Version:  docker://1.13.1
  Kubelet Version:            v1.18.6
  Kube-Proxy Version:         v1.18.6
Non-terminated Pods:          (1 in total)
  Namespace                   Name                CPU Requests  CPU Limits  Memory Requests  Memory Limits  AGE
  ---------                   ----                ------------  ----------  ---------------  -------------  ---
  kube-system                 kube-proxy-snxhr    0 (0%)        0 (0%)      0 (0%)           0 (0%)         9m50s
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests  Limits
  --------           --------  ------
  cpu                0 (0%)    0 (0%)
  memory             0 (0%)    0 (0%)
  ephemeral-storage  0 (0%)    0 (0%)
  hugepages-1Gi      0 (0%)    0 (0%)
  hugepages-2Mi      0 (0%)    0 (0%)
Events:
  Type    Reason                   Age                    From                                  Message
  ----    ------                   ----                   ----                                  -------
  Normal  Starting                 9m50s                  kubelet, unica12node1.localdomain     Starting kubelet.
  Normal  NodeHasSufficientMemory  9m50s (x2 over 9m50s)  kubelet, unica12node1.localdomain     Node unica12node1.localdomain status is now: NodeHasSufficientMemory
  Normal  NodeHasNoDiskPressure    9m50s (x2 over 9m50s)  kubelet, unica12node1.localdomain     Node unica12node1.localdomain status is now: NodeHasNoDiskPressure
  Normal  NodeHasSufficientPID     9m50s (x2 over 9m50s)  kubelet, unica12node1.localdomain     Node unica12node1.localdomain status is now: NodeHasSufficientPID
  Normal  NodeAllocatableEnforced  9m50s                  kubelet, unica12node1.localdomain     Updated Node Allocatable limit across pods
  Normal  Starting                 9m39s                  kube-proxy, unica12node1.localdomain  Starting kube-proxy.


Name:               unica12node2.localdomain
Roles:              <none>
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    kubernetes.io/arch=amd64
                    kubernetes.io/hostname=unica12node2.localdomain
                    kubernetes.io/os=linux
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, 09 Aug 2020 05:50:29 +0800
Taints:             node.kubernetes.io/not-ready:NoSchedule
Unschedulable:      false
Lease:
  HolderIdentity:  unica12node2.localdomain
  AcquireTime:     <unset>
  RenewTime:       Sun, 09 Aug 2020 05:59:59 +0800
Conditions:
  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  MemoryPressure   False   Sun, 09 Aug 2020 05:55:59 +0800   Sun, 09 Aug 2020 05:50:29 +0800   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Sun, 09 Aug 2020 05:55:59 +0800   Sun, 09 Aug 2020 05:50:29 +0800   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure      False   Sun, 09 Aug 2020 05:55:59 +0800   Sun, 09 Aug 2020 05:50:29 +0800   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready            False   Sun, 09 Aug 2020 05:55:59 +0800   Sun, 09 Aug 2020 05:50:29 +0800   KubeletNotReady              runtime network not ready: NetworkReady=f                                                                        alse reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Addresses:
  InternalIP:  192.168.1.153
  Hostname:    unica12node2.localdomain
Capacity:
  cpu:                6
  ephemeral-storage:  49250820Ki
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             16266432Ki
  pods:               110
Allocatable:
  cpu:                6
  ephemeral-storage:  45389555637
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             16164032Ki
  pods:               110
System Info:
  Machine ID:                 2776e487ba884dc8b59c196d17b1354b
  System UUID:                CCB04D56-2D23-EF34-CC74-BD921B461E06
  Boot ID:                    06a85a26-dc33-447f-894d-4eccbac0be5e
  Kernel Version:             3.10.0-957.el7.x86_64
  OS Image:                   Red Hat Enterprise Linux
  Operating System:           linux
  Architecture:               amd64
  Container Runtime Version:  docker://1.13.1
  Kubelet Version:            v1.18.6
  Kube-Proxy Version:         v1.18.6
Non-terminated Pods:          (1 in total)
  Namespace                   Name                CPU Requests  CPU Limits  Memory Requests  Memory Limits  AGE
  ---------                   ----                ------------  ----------  ---------------  -------------  ---
  kube-system                 kube-proxy-hj582    0 (0%)        0 (0%)      0 (0%)           0 (0%)         9m34s
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests  Limits
  --------           --------  ------
  cpu                0 (0%)    0 (0%)
  memory             0 (0%)    0 (0%)
  ephemeral-storage  0 (0%)    0 (0%)
  hugepages-1Gi      0 (0%)    0 (0%)
  hugepages-2Mi      0 (0%)    0 (0%)
Events:
  Type    Reason                   Age                    From                                  Message
  ----    ------                   ----                   ----                                  -------
  Normal  Starting                 9m34s                  kubelet, unica12node2.localdomain     Starting kubelet.
  Normal  NodeHasSufficientMemory  9m34s (x2 over 9m34s)  kubelet, unica12node2.localdomain     Node unica12node2.localdomain status is now: NodeHasSufficientMemory
  Normal  NodeHasNoDiskPressure    9m34s (x2 over 9m34s)  kubelet, unica12node2.localdomain     Node unica12node2.localdomain status is now: NodeHasNoDiskPressure
  Normal  NodeHasSufficientPID     9m34s (x2 over 9m34s)  kubelet, unica12node2.localdomain     Node unica12node2.localdomain status is now: NodeHasSufficientPID
  Normal  NodeAllocatableEnforced  9m34s                  kubelet, unica12node2.localdomain     Updated Node Allocatable limit across pods
  Normal  Starting                 9m23s                  kube-proxy, unica12node2.localdomain  Starting kube-proxy.

No comments:

Post a Comment

PVC in terminating state

Referencee:https://veducate.co.uk/kubernetes-pvc-terminating/  I still had errors performing deployment, till I released that although I pre...