Home > Back-end >  check history of OpenShift / Kubernetes deployments
check history of OpenShift / Kubernetes deployments

Time:11-13

We have constantly issues with our OpenShift Deployments. Credentials are missing suddenly (or suddenly we have the wrong credentials configured), deployments are scaled up and down suddenly etc.

Nobody of the team is aware of anything he did. However I am quite sure that this happens unknowingly from my recent experiences.

Is there any way to check the history of modifications to a resource? E.g. the last "oc/kubectl apply -f" - optimally with the contents that were modified and the user?

CodePudding user response:

You need to configure and enable audit log, checkout the oc manual here.

In addition to logging metadata for all requests, logs request bodies for every read and write request to the API servers...

CodePudding user response:

For a one off issue, you can also look at the replicaSets present in that namespace and examine them for differences. Depending on how much history you keep it may have already been lost, if it was present to begin with.

For credentials, assuming those are in a secret and not the deployment itself, you wouldn't have that history without going to audit logs.

  • Related