หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Managing Namespaces

Updated on 2024-08-05 GMT+08:00

A namespace is a collection of resources and objects. Multiple namespaces can be created in a single CCE cluster with the 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

Creation 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), such as 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 manually

You can create namespaces to serve separate purposes. For example, you can create three namespaces, one for a development environment, one for joint debugging environment, and one for testing environment. You can also create one namespace for login services and one for game services.

This section describes how to create and delete a namespace, and manage namespace resource quotas.

Prerequisites

A CCE cluster has been bound to the environment. For details, see Binding a CCE Cluster.

Creating a Namespace

  1. Log in to ServiceStage.
  2. On the Environment Management page, click the target environment.
  3. In the Resource Settings area, choose Cloud Container Engine from Compute.
  4. Click Namespace > Create Namespace.
  5. Set the parameters by referring to the following table. Parameters marked with an asterisk (*) are mandatory.

    Parameter

    Description

    *Namespace

    Namespace name.

    Namespace description

    Description about the namespace.

    Figure 1 Setting namespace parameters

  6. Click OK.

    The created namespace is displayed in the namespace list.

Deleting a Namespace

NOTICE:
  • If a namespace is deleted, all resources (such as workloads and configuration items) in this namespace will be also deleted. Exercise caution when deleting a namespace.
  • The cluster-created namespace default cannot be deleted.
  1. Log in to ServiceStage.
  2. On the Environment Management page, click the target environment.
  3. In the Resource Settings area, choose Cloud Container Engine from Compute.
  4. Click the Namespace tab.

    • To delete a single namespace, locate the target namespace and click Delete in the Operation column.
    • To delete namespaces in batches, select the target namespaces and click Delete above the namespaces.

  5. In the displayed dialog box, enter DELETE and click OK.

Managing Namespace Resource Quotas

By default, pods running in a CCE cluster can use the CPUs and memory of a node without restrictions. This means that pods in a namespace may exhaust all resources of the cluster.

Kubernetes provides namespaces for you to group workloads in a cluster. By setting resource quotas for each namespace, you can prevent resource exhaustion and ensure cluster reliability. You can configure quotas for resources such as CPU, memory, and the number of pods in a namespace. For more information, see Resource Quotas.

User-created namespaces and the cluster-created namespace default support resource quota management.

  1. Log in to ServiceStage.
  2. On the Environment Management page, click the target environment.
  3. In the Resource Settings area, choose Cloud Container Engine from Compute.
  4. Click the Namespace tab.
  5. Locate the target namespace and click Resource Quota Manager in the Operation column.

    In the displayed Resource Quota Manager dialog box, view the resource types, total resource quotas, and accumulated quota usage in the namespace.
    Figure 2 Accessing the Resource Quota Manager page

  6. Click Edit Quota and set the total quota of each resource type.

    • If the usage of a resource type is not limited, enter 0.
    • If the usage of a resource type is limited, enter the expected integer.
      NOTICE:
      • Accumulated quota usage includes the resources used by CCE to create default components, such as the Kubernetes Services (which can be viewed using kubectl) created under the default namespace. Therefore, you are advised to set a resource quota greater than expected to reserve resource for creating default components.
      • If the total CPU or memory quota in a namespace is limited, you must set the maximum and minimum number of CPU cores and memory (GiB) that can be used by the component when setting resources for the Kubernetes component of this namespace in Creating and Deploying a Component and Upgrading a Single Component. Otherwise, the operation will fail.
      • If the total quota of other resource types in a namespace is limited and the remaining usage of this resource type does not meet requirements, the Kubernetes component of this namespace will fail to be deployed.

  7. Click OK.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback