Is there a different way than kubectl edit
to delete an annotation in Kubernetes?
I do not like the interactivity of kubectl edit
. I prefer so
An alternative way to achieve this goal, might be using kubectl patch
command by invoking JSON patch method. Unfortunately it is more weighty solution comparing to your answer:
kubectl patch svc
More detailed information can be found in Jsonpatch document.