tamil
tamil

Reputation: 391

what use of record option in kubectl run command?

Im not clear with the use of --record in kubectl command.

kubectl run nginx image=nginx --port=80 --record

detailed explanation with an example is much appreciated.

Upvotes: 2

Views: 835

Answers (1)

Garrett F.
Garrett F.

Reputation: 76

Using the --record flag when using kubectl annotates the objects created with that command with the command used to create them. When you list/retrieve these objects, the annotations will show up so that objects can be associated with a command.

I should warn you, however, that there is talk of deprecating this flag in the Kubernetes official repository here

https://github.com/kubernetes/kubernetes/pull/20035

and here

https://github.com/kubernetes/kubernetes/issues/40422

Upvotes: 3

Related Questions