Christian
Christian

Reputation: 1291

Is there a way to track kubectl history from other users in gcp?

As the team gets more comfortable with the Google Cloud Platform and kubernetes, then the ability to track what changes are being applied to the environment gets more important. We're using kubectl apply yaml files (mostly deployments, services, and configmaps). Is there a way to see what changes are being applied via kubectl?

Upvotes: 0

Views: 469

Answers (1)

vjdhama
vjdhama

Reputation: 5058

You can use kubernetes audits to do what you need.

If you're using GKE with a cluster version > 1.8.3 audit logging is available by default in stackdriver logging.

https://cloud.google.com/kubernetes-engine/docs/how-to/audit-logging

You could also read these logs using fluentd if you're not using GKE, by specifying the log dir in fluentd config.

Upvotes: 1

Related Questions