更新时间:2024-09-30 GMT+08:00

API概览

云容器引擎所提供的接口分为CCE接口与Kubernetes原生接口。通过配合使用CCE接口和Kubernetes原生接口,您可以完整的使用云容器引擎的所有功能,包括创建集群,使用Kubernetes接口创建容器工作负载,使用CCE接口监控工作负载的使用数据等。

类型

子类型

说明

CCE接口

集群管理(Autopilot)

集群管理接口,包括创建、删除集群的接口等。

通过这些接口,您可以创建集群、获取已创建集群的信息。

插件管理(Autopilot)

插件管理接口,包括AddonTemplates的查询,AddonInstance的创建、更新、删除和获取。

集群升级(Autopilot)

集群升级接口,包括集群升级、升级前检查、集群备份等相关接口。

配额管理(Autopilot)

配额管理接口,支持查询CCE服务下资源配额。

配额管理(Autopilot)

标签管理接口,支持添加、删除集群的资源标签。

模板管理(Autopilot)

模板管理接口,支持模板和模板实例的创建、删除、更新、获取等操作。

Kubernetes原生接口

-

Kubernetes原生接口,关于如何调用请参见使用Kubernetes API

Kubernetes API

API

功能

URI

Node

获取指定的Node

GET /api/v1/nodes/{name}

列出所有的Node

GET /api/v1/nodes

更新指定的Node

PATCH /api/v1/nodes/{name}

Namespace

创建Namespace

POST /api/v1/namespaces

删除Namespace

DELETE /api/v1/namespaces/{name}

获取指定的Namespace

GET /api/v1/namespaces/{name}

替换指定的Namespace

PUT /api/v1/namespaces/{name}

替换指定的Namespace的状态

PUT /api/v1/namespaces/{name}/status

替换指定的Namespace的Finalize值

PUT /api/v1/namespaces/{name}/finalize

列出Namespace

GET /api/v1/namespaces

更新指定的Namespace

PATCH /api/v1/namespaces/{name}

Resourcequotas

获取Resourcequotas

GET /api/v1/resourcequotas

创建Resourcequota

POST /api/v1/namespaces/{namespace}/resourcequotas

更新Resourcequota

PUT /api/v1/namespaces/{namespace}/resourcequotas/{name}

删除Resourcequota

DELETE /api/v1/namespaces/{namespace}/resourcequotas/{name}

Pod

创建Pod

POST /api/v1/namespaces/{namespace}/pods

删除Pod

DELETE /api/v1/namespaces/{namespace}/pods/{name}

删除所有的Pod

DELETE /api/v1/namespaces/{namespace}/pods

获取指定的Pod

GET /api/v1/namespaces/{namespace}/pods/{name}

替换指定的Pod

PUT /api/v1/namespaces/{namespace}/pods/{name}

替换指定的Pod的状态

PUT /api/v1/namespaces/{namespace}/pods/{name}/status

列出指定Namespaces下的所有Pod

GET /api/v1/namespaces/{namespace}/pods

列出Pod

GET /api/v1/pods

更新指定的Pod

PATCH /api/v1/namespaces/{namespace}/pods/{name}

Deployment

创建Deployment

POST /apis/apps/v1/namespaces/{namespace}/deployments

创建Deployment的回滚操作

PATCH /apis/apps/v1/namespaces/{namespace}/deployments/{name}

删除Deployment

DELETE /apis/apps/v1/namespaces/{namespace}/deployments/{name}

删除所有的Deployment

DELETE /apis/apps/v1/namespaces/{namespace}/deployments

获取指定的Deployment

GET /apis/apps/v1/namespaces/{namespace}/deployments/{name}

获取指定的Deployment的状态

GET /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status

获取指定的Deployment的伸缩操作

GET /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale

替换指定的Deployment

PUT /apis/apps/v1/namespaces/{namespace}/deployments/{name}

替换指定的Deployment的状态

PUT /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status

替换指定的Deployment的伸缩操作

PUT /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale

列出指定Namespace下的Deployment

GET /apis/apps/v1/namespaces/{namespace}/deployments

列出所有的Deployment

GET /apis/apps/v1/deployments

更新指定的Deployment

PATCH /apis/apps/v1/namespaces/{namespace}/deployments/{name}

更新指定的Deployment的状态

PATCH /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status

更新指定的Deployment的伸缩操作

PATCH /apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale

Statefulset

创建StatefulSet

POST /apis/apps/v1/namespaces/{namespace}/statefulsets

删除指定的StatefulSet

DELETE /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

删除所有的StatefulSet

DELETE /apis/apps/v1/namespaces/{namespace}/statefulsets

获取指定的StatefulSet

GET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

获取指定的StatefulSet的状态

GET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status

替换指定的StatefulSet

PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

替换指定的StatefulSet的状态

PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status

列出指定Namespace下的StatefulSet

GET /apis/apps/v1/namespaces/{namespace}/statefulsets

列出所有的StatefulSet

GET /apis/apps/v1/statefulsets

更新指定的StatefulSet

PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

更新指定的StatefulSet的状态

PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status

Job

创建Job

POST /apis/batch/v1/namespaces/{namespace}/jobs

删除Job

DELETE /apis/batch/v1/namespaces/{namespace}/jobs/{name}

删除所有的Job

DELETE /apis/batch/v1/namespaces/{namespace}/jobs

获取指定的Job

GET /apis/batch/v1/namespaces/{namespace}/jobs/{name}

获取指定的Job的状态

GET /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status

替换指定的Job

PUT /apis/batch/v1/namespaces/{namespace}/jobs/{name}

替换指定的Job的状态

PUT /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status

列出指定Namespace下的Job

GET /apis/batch/v1/namespaces/{namespace}/jobs

列出所有Job

GET /apis/batch/v1/jobs

更新指定的Job的状态

PATCH /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status

更新指定的Job

PATCH /apis/batch/v1/namespaces/{namespace}/jobs/{name}

CronJob

创建CronJob

POST /apis/batch/v1/namespaces/{namespace}/cronjobs

删除CronJob

DELETE /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}

删除所有的CronJob

DELETE /apis/batch/v1/namespaces/{namespace}/cronjobs

获取指定的CronJob

GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}

获取指定的CronJob的状态

GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status

替换指定的CronJob

PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}

替换指定的CronJob的状态

PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status

列出指定Namespace下的CronJob

GET /apis/batch/v1/namespaces/{namespace}/cronjobs

列出所有的CronJob

GET /apis/batch/v1/cronjobs

更新指定的CronJob的状态

PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status

更新指定的CronJob

PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}

ReplicaSet

列出指定的ReplicaSet

GET /apis/apps/v1/namespaces/{namespace}/replicasets

获取指定的ReplicaSet

GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}

获取Replicasets

GET /apis/apps/v1/replicasets

ReplicationController

创建ReplicationController

POST /api/v1/namespaces/{namespace}/replicationcontrollers

删除ReplicationController

DELETE /api/v1/namespaces/{namespace}/replicationcontrollers/{name}

删除所有的ReplicationController

DELETE /api/v1/namespaces/{namespace}/replicationcontrollers

获取指定Namespace下的ReplicationController

GET /api/v1/namespaces/{namespace}/replicationcontrollers/{name}

替换指定Namespace下的ReplicationController

PUT /api/v1/namespaces/{namespace}/replicationcontrollers/{name}

替换指定Namespace下的ReplicationController状态

PUT /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status

列出指定Namespace下的ReplicationController

GET /api/v1/namespaces/{namespace}/replicationcontrollers

列出ReplicationController

GET /api/v1/replicationcontrollers

更新指定的ReplicationController

PATCH /api/v1/namespaces/{namespace}/replicationcontrollers/{name}

Endpoints

创建Endpoints

POST /api/v1/namespaces/{namespace}/endpoints

删除Endpoints

DELETE /api/v1/namespaces/{namespace}/endpoints/{name}

删除所有的Endpoints

DELETE /api/v1/namespaces/{namespace}/endpoints

获取指定的Endpoints

GET /api/v1/namespaces/{namespace}/endpoints/{name}

替换指定的Endpoints

PUT /api/v1/namespaces/{namespace}/endpoints/{name}

列出Endpoints

GET /api/v1/endpoints

列出指定Namespace下的Endpoints

GET /api/v1/namespaces/{namespace}/endpoints

更新指定的Endpoints

PATCH /api/v1/namespaces/{namespace}/endpoints/{name}

Service

创建Service

POST /api/v1/namespaces/{namespace}/services

删除指定的Service

DELETE /api/v1/namespaces/{namespace}/services/{name}

获取指定的Service

GET /api/v1/namespaces/{namespace}/services/{name}

替换指定的Service

PUT /api/v1/namespaces/{namespace}/services/{name}

列出指定Namespace下的Service

GET /api/v1/namespaces/{namespace}/services

列出Service

GET /api/v1/services

更新指定的Service

PATCH /api/v1/namespaces/{namespace}/services/{name}

Ingress

创建Ingress

POST /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses

更新指定的Ingress

PATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}

替换指定的Ingress

PUT /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}

删除Ingress

DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}

删除所有的Ingress

DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses

获取指定的Ingress

GET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}

列出指定Namespace下的Ingress

GET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses

获取Ingress列表

GET /apis/networking.k8s.io/v1/ingresses

获取指定Namespace下的某个Ingress对象的状态

GET /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status

替换指定Namespace下的某个Ingress对象的状态

PUT /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status

更新指定Namespace下的某个Ingress对象的状态

PATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status

NetworkPolicy

创建networkpolicy

POST /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies

更新指定的networkpolicy

PATCH /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}

替换指定的networkpolicy

PUT /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}

删除networkpolicy

DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}

批量删除networkpolicy

DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies

获取指定的networkpolicy

GET /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}

列出指定namespace下的networkpolicy

GET /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies

获取networkpolicy列表

GET /apis/networking.k8s.io/v1/networkpolicies

PersistentVolume

创建PersistentVolume

POST /api/v1/persistentvolumes

删除指定的PersistentVolume

DELETE /api/v1/persistentvolumes/{name}

删除所有的PersistentVolume

DELETE /api/v1/persistentvolumes

获取指定的PersistentVolume

GET /api/v1/persistentvolumes/{name}

替换指定的PersistentVolume

PUT /api/v1/persistentvolumes/{name}

替换指定的PersistentVolume的状态

PUT /api/v1/persistentvolumes/{name}/status

列出所有的PersistentVolume

GET /api/v1/persistentvolumes

更新指定的PersistentVolume

PATCH /api/v1/persistentvolumes/{name}

PersistentVolumeClaim

创建PersistentVolumeClaim

POST /api/v1/namespaces/{namespace}/persistentvolumeclaims

删除指定的PersistentVolumeClaim

DELETE /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}

删除所有的PersistentVolumeClaim

DELETE /api/v1/namespaces/{namespace}/persistentvolumeclaims

获取指定的PersistentVolumeClaim

GET /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}

替换指定的PersistentVolumeClaim

PUT /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}

替换指定的PersistentVolumeClaim的状态

PUT /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status

列出指定的Namespace下的PersistentVolumeClaim

GET /api/v1/namespaces/{namespace}/persistentvolumeclaims

列出所有的PersistentVolumeClaim

GET /api/v1/persistentvolumeclaims

更新指定的PersistentVolumeClaim

PATCH /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}

ConfigMap

创建ConfigMap

POST /api/v1/namespaces/{namespace}/configmaps

删除ConfigMap

DELETE /api/v1/namespaces/{namespace}/configmaps/{name}

删除所有的ConfigMap

DELETE /api/v1/namespaces/{namespace}/configmaps

获取指定的ConfigMap

GET /api/v1/namespaces/{namespace}/configmaps/{name}

替换指定ConfigMap

PUT /api/v1/namespaces/{namespace}/configmaps/{name}

列出指定Namespace下的ConfigMap

GET /api/v1/namespaces/{namespace}/configmaps

列出所有的ConfigMap

GET /api/v1/configmaps

更新指定的ConfigMap

PATCH /api/v1/namespaces/{namespace}/configmaps/{name}

Secret

创建Secret

POST /api/v1/namespaces/{namespace}/secrets

删除Secret

DELETE /api/v1/namespaces/{namespace}/secrets/{name}

删除指定命名空间下所有的Secret

DELETE /api/v1/namespaces/{namespace}/secrets

获取Secret信息

GET /api/v1/namespaces/{namespace}/secrets/{name}

替换指定的Secret

PUT /api/v1/namespaces/{namespace}/secrets/{name}

列出指定Namespace下的Secret

GET /api/v1/namespaces/{namespace}/secrets

列出集群下的Secret

GET /api/v1/secrets

RBAC/

ClusterRole

创建ClusterRole

POST /apis/rbac.authorization.k8s.io/v1/clusterroles

更新指定的ClusterRole

PATCH /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}

替换指定的ClusterRole

PUT /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}

删除指定的ClusterRole

DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}

批量删除ClusterRole

DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles

获取指定的ClusterRole

GET /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}

获取ClusterRole列表

GET /apis/rbac.authorization.k8s.io/v1/clusterroles

RBAC/

ClusterRoleBinding

创建ClusterRoleBinding

POST /apis/rbac.authorization.k8s.io/v1/clusterrolebindings

更新指定的ClusterRoleBinding

PATCH /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}

替换指定的ClusterRoleBinding

PUT /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}

删除指定的ClusterRoleBinding

DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}

批量删除ClusterRoleBinding

DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings

获取指定的ClusterRoleBinding

GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}

获取ClusterRoleBinding列表

GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings

RBAC/Role

创建Role

POST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles

更新指定的Role

PATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}

替换指定的Role

PUT /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}

删除指定的Role

DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}

批量删除Role

DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles

获取指定的Role

GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}

获取指定namespace下的Role列表

GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles

获取Role列表

GET /apis/rbac.authorization.k8s.io/v1/roles

RBAC/RoleBinding

创建RoleBinding

POST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings

更新指定的RoleBinding

PATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}

替换指定的RoleBinding

PUT /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}

删除指定的RoleBinding

DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}

批量删除RoleBinding

DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings

获取指定的RoleBinding

GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}

获取指定namespace下RoleBinding列表

GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings

获取RoleBinding列表

GET /apis/rbac.authorization.k8s.io/v1/rolebindings

API groups

列出APIVersions

GET /api

列出APIGroups

GET /apis

listing APIResources of GroupVersion apiregistration.k8s.io/v1beta1

GET /apis/apiregistration.k8s.io/v1beta1

listing APIResources of GroupVersion extensions/v1beta1

GET /apis/extensions/v1beta1

listing APIResources of GroupVersion apps/v1&apps/v1beta1

GET /apis/apps/v1

listing APIResources of GroupVersion authentication.k8s.io/v1

GET /apis/authentication.k8s.io/v1

listing APIResources of GroupVersion authentication.k8s.io/v1beta1

GET /apis/authentication.k8s.io/v1beta1

listing APIResources of GroupVersion authorization.k8s.io/v1

GET /apis/authorization.k8s.io/v1

listing APIResources of GroupVersion authorization.k8s.io/v1beta1

GET /apis/authorization.k8s.io/v1beta1

listing APIResources of GroupVersion autoscaling/v1

GET /apis/autoscaling/v1

listing APIResources of GroupVersion batch/v1

GET /apis/batch/v1

listing APIResources of GroupVersion certificates.k8s.io/v1beta1

GET /apis/certificates.k8s.io/v1beta1

listing APIResources of GroupVersion networking.k8s.io/v1

GET /apis/networking.k8s.io/v1

listing APIResources of GroupVersion policy/v1beta1

GET /apis/policy/v1beta1

listing APIResources of GroupVersion rbac.authorization.k8s.io/v1beta1

GET /apis/rbac.authorization.k8s.io/v1beta1

listing APIResources of GroupVersion storage.k8s.io/v1

GET /apis/storage.k8s.io/v1

listing APIResources of GroupVersion storage.k8s.io/v1beta1

GET /apis/storage.k8s.io/v1beta1

listing APIResources of GroupVersion apiextensions.k8s.io/v1beta1

GET /apis/apiextensions.k8s.io/v1beta1

listing APIResources of GroupVersion v1

GET /api/v1

Event

获取Event

GET /api/v1/events

列出指定命名空间下的Event

GET /api/v1/namespaces/{namespace}/events