Labels
As soon as the number of applications grows within an organization, managing all of them tends to be a nightmare. Imagine that you only have fifteen microservices and two environments: one for staging and the other for production. In this case, identifying all of the running pods would be really hard to do, and you would need to remember all of the pod names in order to query their statuses.
Labels are intended to make this task easier. You can use them to tag pods with label names that are easy to remember and which make sense to you. Since a label is a key–value pair, you have the chance to use whatever you want, including environment:<environment-name>, for instance. Let's review the following application-xyz-pod.yaml example file: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access