Kubernetes: Verificando o estado do Kubernetes após a configuração

From Wiki
Revision as of 15:46, 14 August 2019 by Ebasso (talk | contribs)

Verificação inicial

  • Verificando o estado dos nodes
kubectl get nodes

O Status correto deve ser Ready, é preciso verificar os status NotReady.

  • Verificando o estado dos pods
kubectl get pods --all-namespaces -o wide

O Status correto deve ser Running, é preciso verificar os status Pending, ContainerCreating, ImagePullBackOff.

  • Verificando o journalctl, para verificar o status do kubelet
journalctl -n 100 -u kubelet


Troubleshooting 1 - Problemas com Calico

kubectl get nodes
NAME           STATUS     ROLES     AGE       VERSION
server000001   NotReady   master    21h       v1.11.9
server000002   NotReady   <none>    19h       v1.11.9
server000003   NotReady   <none>    19h       v1.11.9
kubectl get pods --all-namespaces -o wide
NAMESPACE     NAME                                   READY     STATUS              RESTARTS   AGE       IP               NODE           NOMINATED NODE
kube-system   calico-node-77zqw                      0/2       ContainerCreating   0          19h       172.17.133.113   server000003   <none>
kube-system   calico-node-9896s                      0/2       ContainerCreating   0          19h       172.17.133.112   server000002   <none>
kube-system   calico-node-9xngd                      0/2       ImagePullBackOff    0          19h       172.17.133.111   server000001   <none>
kube-system   coredns-78fcdf6894-fkzcr               0/1       Pending             0          21h       <none>           <none>         <none>
kube-system   coredns-78fcdf6894-lzz25               0/1       Pending             0          21h       <none>           <none>         <none>
kube-system   etcd-hxl1scb00017                      1/1       Running             1          21h       172.17.133.111   server000001   <none>
kube-system   kube-apiserver-hxl1scb00017            1/1       Running             0          21h       172.17.133.111   server000001   <none>
kube-system   kube-controller-manager-hxl1scb00017   1/1       Running             0          21h       172.17.133.111   server000001   <none>
kube-system   kube-proxy-qllcx                       0/1       ContainerCreating   0          19h       172.17.133.113   server000003   <none>
kube-system   kube-proxy-wxphc                       0/1       ContainerCreating   0          19h       172.17.133.112   server000002   <none>
kube-system   kube-proxy-xvljr                       1/1       Running             0          21h       172.17.133.111   server000001   <none>
kube-system   kube-scheduler-hxl1scb00017            1/1       Running             1          21h       172.17.133.111   server000001   <none>


Verificando o journalctl

journalctl -n 100 -u kubelet ... Aug 14 12:10:00 hxl1scb00017 kubelet[52727]: E0814 12:10:00.659426 52727 kubelet.go:2106] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network p Aug 14 12:10:04 hxl1scb00017 kubelet[52727]: E0814 12:10:04.837493 52727 dns.go:180] CheckLimitsForResolvConf: Resolv.conf file '/etc/resolv.conf' contains search line consisting of more than 3 domain Aug 14 12:10:05 hxl1scb00017 kubelet[52727]: W0814 12:10:05.663617 52727 cni.go:172] Unable to update cni config: No networks found in /etc/cni/net.d ...


Ver também