How can I review the history pod created by the deployment?

Solution Verified - Updated -

Environment

  • Red Hat OpenShift Container Platform(RHOCP)
    • 4.x

Issue

  • How can I review the history pod created by the deployment? in the Openshift Container?

Resolution

    1. Use oc get events. to review the pod name of the history record.
    1. Use oc get deployment <deployment name> -o yaml to review the time of the history record.
$ oc get event
3m36s       Normal    Killing                pod/kibana-58fbb4c4f9-m2kss                 Stopping container kibana # < ---------- Review the the pod was killed. and the pods name was ibana-58fbb4c4f9-m2kss 
3m35s       Normal    Scheduled              pod/kibana-58fbb4c4f9-q9fm8                 Successfully assigned openshift-logging/kibana-58fbb4c4f9-q9fm8 to worker03.ocp4.danliu.com
3m34s       Normal    AddedInterface         pod/kibana-58fbb4c4f9-q9fm8                 Add eth0 [10.128.3.232/23] from openshift-sdn
3m34s       Normal    Pulled                 pod/kibana-58fbb4c4f9-q9fm8                 Container image "registry.redhat.io/openshift-logging/kibana6-rhel8@sha256:78bf3d6755fc735636c930b3cedd3c42ec3d580b8cb8c5776617b8d6165162d9" already present on machine
3m33s       Normal    Created                pod/kibana-58fbb4c4f9-q9fm8                 Created container kibana # < ---------- Review the new pods was created, and the pod name was kibana-58fbb4c4f9-q9fm8  

$ oc get deployment kibana -o yaml

  conditions:
  - lastTransitionTime: "2023-05-09T08:28:35Z"
    lastUpdateTime: "2023-05-09T08:28:45Z"
    message: ReplicaSet "kibana-58fbb4c4f9" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  - lastTransitionTime: "2023-06-05T06:45:33Z"
    lastUpdateTime: "2023-06-05T06:45:33Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available

As per the code the time-to-live for events is 3 hours in an RHOCP cluster.
REF: Time-to-live for the events in an RHOCP cluster

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments