云容器引擎 CCE_AUTOPILOT-创建命名空间:使用kubectl创建Namespace

时间:2024-08-02 22:37:38

使用kubectl创建Namespace

使用如下方式定义Namespace。

apiVersion: v1 
kind: Namespace 
metadata: 
  name: custom-namespace 

使用kubectl命令创建。

$ kubectl create -f custom-namespace.yaml
namespace/custom-namespace created 

您还可以使用kubectl create namespace命令创建。

$ kubectl create namespace custom-namespace 
namespace/custom-namespace created 
support.huaweicloud.com/usermanual-cce-autopilot/cce_11_0278.html