- All Courses
- Kubernetes for Application Developers
- The Objects You Actually Use
- Namespaces and labels
Namespaces and labels
Almost every relationship in Kubernetes is expressed as a label selector: services find pods, deployments find their pods, network policies find their targets.
Overview
Labels are the query language
Almost every relationship in Kubernetes is expressed as a label selector: services find pods, deployments find their pods, network policies find their targets. Labels are not documentation, they are wiring.
Namespaces scope names and provide a boundary for quotas and access control. They do not isolate the network by default, which surprises people who assume separate namespaces cannot talk.
Adopt the recommended label conventions from the beginning. Retrofitting labels across a live cluster means touching every workload.
In this lesson you will:
- Partition a cluster into namespaces
- Use labels as the selection mechanism
- Adopt a consistent labelling convention
Resources
Notes are not saved yet — they clear when you leave this page.
ConfigMaps and Secrets
17m
Ingress and routing
6m