Reputation: 12019
In kubernetes, you can listen for events using kubectl get events
. This works for other resources, but I would like to know when a Service is created and destroyed.
When I run kubectl describe my-service
I get Events: <none>
.
How can I know when a service was created?
Upvotes: 0
Views: 201
Reputation: 54181
Every api object has a creation timestamp in the metadata section. Though that doesn’t tell when it is edited. For that you might want an audit webhook or something like Brigade.
Upvotes: 1
Reputation: 17615
When a service gets created, you should get the service listed when you run below command
Kubectl get svc
Upvotes: 0