Welcome to the Linux Foundation Forum!

Question about "Using Annotations" slide in API section

Hi. In the APIs chapter on the Using Annotations page it says on the bottom:

For example, to annotate only Pods within a namespace, you can overwrite the annotation, and finally delete it. See the following commands:

$ kubectl annotate pods --all description='Production Pods' -n prod 
$ kubectl annotate --overwrite pod webpod description="Old Production Pods" -n prod 
$ kubectl -n prod annotate pod webpod description-

I don't get what this is doing. It says "to annotate only Pods within a namespace" but the first command already annotates all pods in the namespace. The next two seem to remove webpod's description but overwriting first for some reason...

I feel like this is misworded or something?

I am asking because it seems like it might be a useful for the certification test

Answers

  • oleksazhel
    oleksazhel Posts: 57

    I agree. Looks like bad Engilsh. It shoud be at least something like:
    "
    For example, you can to annotate only Pods within a namespace, you can overwrite the annotation, and finally delete it. See the following commands:
    "

  • jsm3031
    jsm3031 Posts: 16

    Oh.. yeah, then it makes sense. it's three separate examples. Not one procedure with three steps. Thanks for helping me understand

Categories

Upcoming Training