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:

  1. $ kubectl annotate pods --all description='Production Pods' -n prod
  2. $ kubectl annotate --overwrite pod webpod description="Old Production Pods" -n prod
  3. $ kubectl -n prod annotate pod webpod description-
  4.  

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

  • 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:
    "

  • Posts: 16

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

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training