Recall & Review
beginner
What is a label in Kubernetes?
A label is a key-value pair attached to Kubernetes objects used to identify and organize them for selection and grouping.
Click to reveal answer
beginner
What is an annotation in Kubernetes?
An annotation is a key-value pair attached to Kubernetes objects used to store non-identifying metadata, like build info or URLs.
Click to reveal answer
intermediate
How do labels differ from annotations in Kubernetes?
Labels are used for grouping and selecting objects, while annotations store extra metadata that does not affect selection.
Click to reveal answer
beginner
Can annotations be used to select Kubernetes objects?
No, annotations cannot be used to select objects; only labels support selection and filtering.
Click to reveal answer
intermediate
Give an example use case for labels and annotations.
Labels: Mark pods by environment (e.g., 'env=production') for deployment. Annotations: Store build version or contact info for debugging.
Click to reveal answer
Which Kubernetes feature is used to group and select objects?
✗ Incorrect
Labels are designed for grouping and selecting Kubernetes objects.
What kind of data do annotations typically store?
✗ Incorrect
Annotations store extra metadata that does not affect object selection.
Can you use annotations to filter Kubernetes objects in a query?
✗ Incorrect
Only labels can be used to filter and select Kubernetes objects.
Which of these is a valid label example?
✗ Incorrect
Labels are simple key-value pairs used for selection, like 'env=production'.
Annotations are best used for:
✗ Incorrect
Annotations store metadata that helps tools and humans but does not affect object grouping.
Explain the difference between labels and annotations in Kubernetes.
Think about how you find or organize things versus how you add notes about them.
You got /3 concepts.
Describe a scenario where you would use a label and another where you would use an annotation.
Labels help pick groups; annotations add extra info.
You got /2 concepts.