Example labels: Labels are key-value pairs assigned to Kubernetes Objects like Pods, Service
- find all pods that have a value associated with the key
- merge and stream logs of the various pod that share the same label
- apply filters to replica sets
Unlike names and UIDs, labels do not provide uniqueness. In general, we many objects can have the same label.
Label selectors can be used to identify a set of objects. The label selector is the core grouping primitive in Kubernetes.
The API currently supports two types of selectors:
environment = production
tier != frontend
- environment in (production, qa)
- tier notin (frontend, backend)
Annotations are used to store data about the resource itself
This usually consists of machine-generated data, and can even be stored in JSON form.
last updated managed by sidecar injection configuration etc
A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods.
A ReplicaSet ensures that a specified number of pod replicas are running at any given time.
|Long Name||Short Name|