27 Mart 2022 Pazar

kubectl describe pods seçeneği

1. Reason Alanı
Pod çalışmıyorsa bu alanın değerine bakılır. Açıklaması şöyle
1: An exceeded pod memory limit causes a OOMKilled termination
2: Node out of memory causes a MemoryPressure and and pod eviction.
OOMKilled ise açıklaması şöyle
There are two main OOMKilled errors you’ll see in Kubernetes:

  1. OOMKilled: Limit Overcommit : Node'a çok fazla pod verilmiştir.
  2. OOMKilled: Container Limit Reached : Pod çok fazla bellek tüketmiştir.
Örnek
Şöyle olsun. Burada OOMKilled görülüyor çünkü Pod'a yeterli bellek ayrılmamış. 128Mi yetmiyor.
$ kubectl describe pods vitess-operator-587c464495-524nx -n rlwy03
Containers:
  foo:
    ...
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       OOMKilled
      Exit Code:    137
      Started:      Mon, 28 Mar 2022 05:16:05 +0000
      Finished:     Mon, 28 Mar 2022 05:16:13 +0000
    Ready:          False
    Restart Count:  127
    Limits:
      memory:  128Mi
    Requests:
      cpu:     100m
      memory:  128Mi
...
Örnek
Şöyle olsun. Burada kubetnetes düğümümün kaynakları istenilen pod sayısını çalıştırmak için yetersiz.
kubectl describe pod mypod-xxxx

...
Reason:         Evicted
Message:        Pod The node had condition: [MemoryPressure].
Örnek
Şöyle olsun. Burada gcloud komutuyla "stop" edilen bir cluster "start" ile tekrar başlatılamıyor
State:          Waiting
  Reason:       PodInitializing
Last State:     Terminated
  Reason:       ContainerStatusUnknown
  Message:      The container could not be located when the pod was deleted.  The container used to be Running
  Exit Code:    137
  Started:      ...
  Finished:     ...
Ready:          False
2. Events Alanı
Örnek
Şöyle olsun. Burada mount hataları görülüyor.
Events:
  Type     Reason          Age                    From             Message
  ----     ------          ----                   ----             -------
  Warning  NodeNotReady    150m                   node-controller  Node is not ready
  Warning  FailedMount     148m (x6 over 148m)    kubelet          MountVolume.MountDevice failed for volume "pvc-e2afd3bb-99f8-4916-81f5-5187d1af0265" : kubernetes.io/csi: attacher.MountDevice failed to create newCsiDriverClient: driver name rook-ceph.cephfs.csi.ceph.com not found in the list of registered CSI drivers
  Warning  FailedMount     148m (x6 over 148m)    kubelet          MountVolume.MountDevice failed for volume "pvc-5d8b5425-e76f-4ee0-8d89-fcbff627d664" : kubernetes.io/csi: attacher.MountDevice failed to create newCsiDriverClient: driver name rook-ceph.cephfs.csi.ceph.com not found in the list of registered CSI drivers
  Warning  FailedMount     147m (x7 over 148m)    kubelet          MountVolume.MountDevice failed for volume "pvc-b7aa1775-2187-4eac-a2c9-f9cc141f9c00" : kubernetes.io/csi: attacher.MountDevice failed to create newCsiDriverClient: driver name rook-ceph.cephfs.csi.ceph.com not found in the list of registered CSI drivers
  Warning  FailedMount     147m (x6 over 148m)    kubelet          MountVolume.MountDevice failed for volume "pvc-bc6a9994-4074-40d9-b52b-4cea36c94628" : kubernetes.io/csi: attacher.MountDevice failed to create newCsiDriverClient: driver name rook-ceph.cephfs.csi.ceph.com not found in the list of registered CSI drivers
  Normal   AddedInterface  142m                   multus           Add eth0 [10.131.2.18/23] from openshift-sdn
  Normal   Started         78m (x7 over 142m)     kubelet          Started container wait-for-oam
  Normal   Pulled          5m39s (x14 over 142m)  kubelet          Container image "gcr.io/..." already present on machine
  Normal   Created         5m39s (x14 over 142m)  kubelet          Created container wait-for-oam


Hiç yorum yok:

Yorum Gönder

Cluster Propotional Autoscaler - ReplicaSet Ekler/Siler

Giriş Açıklaması şöyle CPA aims to horizontally scale the number of Pod replicas based on the cluster’s scale. A common example is DNS ser...