Updated on 2025-06-13 GMT+08:00

Namespaces

Namespaces provide a way to isolate groups of resources within a single cluster. They allow you to create multiple logical "virtual clusters" within a single cluster. Each namespace has its own resources, configurations, and access control. Namespaces help organize and manage resources in a cluster, so different workloads in the cluster can run without interfering with each other.

Functions of Namespaces

  • Resource isolation: Namespaces can isolate resources (such as pods and Services) of different applications, environments, or teams to avoid conflicts even if they are in the same cluster.
  • Access control and permissions management: Namespaces can work with Kubernetes RBAC for fine-grained permissions management. Different teams or users can access only the resources in the namespaces that they have permissions for.
  • Resource quota management: You can set quotas for resources (such as vCPUs and memory) in each namespace to prevent an application or team from using too many resources and affecting other resources in the cluster.
  • Simplified management: Namespaces help group resources in a cluster. You can create, delete, and manage namespaces as required to reduce cluster management complexity.
  • Combination of namespaces and labels: Kubernetes allows you to configure labels for namespaces to flexibly organize, manage, and identify resources. Labels allow you to filter, classify, and search for resources across namespaces, making it easier to manage cluster resources.