Updated on 2024-09-27 GMT+08:00

Namespace Overview

A namespace is a collection of resources and objects. Multiple namespaces can be created in a single CCE cluster with data isolated from each other. This enables namespaces to share the services of the same cluster without affecting each other. For example, you can deploy workloads in a development environment into one namespace, and deploy workloads in a testing environment into another namespace.

Table 1 describes the namespace types.

Table 1 Namespace types

Type

Description

Created by a cluster by default

When a cluster is started, the default, kube-public, kube-system, and kube-node-lease namespaces are created by default.

  • default: All objects for which no namespace is specified are allocated to this namespace.
  • kube-public: Resources in this namespace can be accessed by all users (including unauthenticated users) to deploy public add-ons and container charts.
  • kube-system: All resources created by Kubernetes are in this namespace.
  • kube-node-lease: Each node has an associated Lease object in this namespace. The object is periodically updated by the node.

Created by a user

You can create namespaces as required. For example, you can create one namespace for a development environment, one for a joint debugging environment, and one for a testing environment. You can also create one namespace for login services and one for game services.