In the first example, you saw how creating a deployment also created a ReplicaSet and related pods, in order to run your software.
Kubernetes has a very flexible mechanism for connecting and referencing objects that it manages. Rather than having a very strict hierarchy of what can be connected, the Kubernetes project uses short, definitive key/value pairs as set of tags on resources, called labels. There is a matching mechanism to query and find related labels, called Selectors.
Labels are fairly strictly defined in format, and are intended to group together resources in Kubernetes. They are not intended to identify a single or unique resource. They can be used to describe relevant information about a set of Kubernetes resources, be that a Pod, ReplicaSet, Deployment, and so on.
As we mentioned earlier, labels are key-value structures. The...