- Getting Started with Kubernetes(Second Edition)
- Jonathan Baier
- 121字
- 2021-07-02 22:51:28
Labels
Labels give us another level of categorization, which becomes very helpful in terms of everyday operations and management. Similar to tags, labels can be used as the basis of service discovery as well as a useful grouping tool for day-to-day operations and management tasks.
Labels are just simple key-value pairs. You will see them on pods, replication controllers, replica sets, services, and so on. The label acts as a selector and tells Kubernetes which resources to work with for a variety of operations. Think of it as a filtering option.
We will take a look at labels more in depth later in this chapter, but first, we will explore the remaining three constructs—services, replication controllers, and replica sets.