kubectl describe pod

From wikieduonline
Revision as of 10:19, 29 December 2022 by Ant (talk | contribs)
Jump to navigation Jump to search

kubectl describe pod

kubectl describe pod | grep -i start
kubectl describe pod | grep "Start Time"


  • kubectl logs podname -c containername --previous


Grafana

.../...
Name:           grafana-6d966d974b-xsvv4
Namespace:      default
Priority:       0
Node:           ip-192-168-54-235.us-east-2.compute.internal/
Start Time:     Sun, 28 Nov 2021 21:31:50 +0300
Labels:         app.kubernetes.io/instance=grafana
                app.kubernetes.io/name=grafana
                pod-template-hash=6d966d974b
Annotations:    checksum/config: a4050f488319bf769d1c8afa79d3cce1dc01de73d491b3516a39582a12f82c44
                checksum/dashboards-json-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
                checksum/sc-dashboard-provider-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
                checksum/secret: f2d8a89d88995eef4432cbfcf48f0f1d46d2b292e6ce6d45a8c7ee2e1971e8c2
                kubernetes.io/psp: eks.privileged
Status:         Failed
Reason:         Evicted
Message:        Pod The node had condition: [MemoryPressure].
IP:
IPs:            <none>
Controlled By:  ReplicaSet/grafana-6d966d974b
Init Containers:
  init-chown-data:
    Image:      busybox:1.31.1
    Port:       <none>
    Host Port:  <none>
    Command:
      chown
      -R
      472:472
      /var/lib/grafana
    Environment:  <none>
    Mounts:
      /var/lib/grafana from storage (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-w7v9x (ro)
  Containers:
   grafana:
    Image:       grafana/grafana:8.2.5
    Ports:       80/TCP, 3000/TCP
    Host Ports:  0/TCP, 0/TCP
    Liveness:    http-get http://:3000/api/health delay=60s timeout=30s period=10s #success=1 #failure=10
    Readiness:   http-get http://:3000/api/health delay=0s timeout=1s period=10s #success=1 #failure=3
    Environment:
      GF_SECURITY_ADMIN_USER:      <set to the key 'admin-user' in secret 'grafana'>      Optional: false
      GF_SECURITY_ADMIN_PASSWORD:  <set to the key 'admin-password' in secret 'grafana'>  Optional: false
      GF_PATHS_DATA:               /var/lib/grafana/
      GF_PATHS_LOGS:               /var/log/grafana
      GF_PATHS_PLUGINS:            /var/lib/grafana/plugins
      GF_PATHS_PROVISIONING:       /etc/grafana/provisioning
    Mounts:
      /etc/grafana/grafana.ini from config (rw,path="grafana.ini")
      /var/lib/grafana from storage (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-w7v9x (ro)
Volumes:
  config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      grafana
    Optional:  false
  storage:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  grafana
    ReadOnly:   false
  kube-api-access-w7v9x:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:                      <none>
.../...

Events

Events:
  Type     Reason                  Age                   From                     Message
  ----     ------                  ----                  ----                     -------
  Normal   Scheduled               15m                   default-scheduler        Successfully assigned YOUR-NAMESPACE/elasticsearch-master-0 to  ip-192-168-9-81.eu-central-1.compute.internal
  Normal   SuccessfulAttachVolume  15m                   attachdetach-controller  AttachVolume.Attach succeeded for volume "pvc-db941c9a-204a-4e66-aa7b-f776dfc892dc"
  Normal   Pulling                 13m (x4 over 14m)     kubelet                  Pulling image "123456789.dkr.ecr.eu-central-1.amazonaws.com/your_project/elasticsearch:v0.6"
   Warning  Failed                  13m (x4 over 14m)     kubelet                  Failed to pull image "123456789.dkr.ecr.eu-central- 1.amazonaws.com/your_project/elasticsearch:v0.6": rpc error: code = Unknown desc = Error response from daemon: manifest for 123456789.dkr.ecr.eu-central-1.amazonaws.com/your_project/elasticsearch:v0.6 not found: manifest unknown: Requested image not found
  Warning  Failed                  13m (x4 over 14m)     kubelet                  Error: ErrImagePull
  Warning  Failed                  13m (x6 over 14m)     kubelet                  Error: ImagePullBackOff
  Normal   BackOff                 4m50s (x43 over 14m)  kubelet                  Back-off pulling image "123456789.dkr.ecr.eu-central- 1.amazonaws.com/your_project/elasticsearch:v0.6"


Events
 Normal   Pulling                 6m46s (x4 over 8m18s)  kubelet                  Pulling image "550886787118.dkr.ecr.eu-central-1.amazonaws.com/ef/elasticsearch:v0.6"
 Warning  Failed                  6m46s (x4 over 8m18s)  kubelet                  Failed to pull image "123456789.dkr.ecr.eu-central-1.amazonaws.com/ef/elasticsearch:v0.6": rpc error: code = Unknown desc = Error response from daemon: repository 123456789.dkr.ecr.eu-central-1.amazonaws.com/ef/elasticsearch not found: name unknown: The repository with name 'your-project/elasticsearch' does not exist in the registry with id '123456789'
 Warning  Failed                  6m46s (x4 over 8m18s)  kubelet                  Error: ErrImagePull
 Warning  Failed                  6m33s (x6 over 8m17s)  kubelet                  Error: ImagePullBackOff

News

  • v1.25 Aug 2022 Added Service Account field in the output of kubectl describe pod command


Related

See also

Advertising: