How to annotate a resource in Kubernetes

Photo by Xavier von Erlach on Unsplash

To annotate a resource, you can use kubectl command.

kubectl annotate <resource_type> <resource_name> annotation

For example,

kubectl annotate po nginx apptype=nginx

You can verify using the following way.

admin@master:~$ kubectl describe po nginx | grep -i anno
Annotations: apptype: nginx
admin@master:~$

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store