概述
更新时间:2020-11-18
欢迎使用百度智能云的核心产品——百度智能云容器引擎服务 CCE(Cloud Container Engine)。您可以使用本文档介绍的 API 对 CCE 服务进行灵活的操作。
如果您是初次调用百度智能云产品的API,可以观看 API 入门视频指南,快速掌握调用API的能力。
与旧版API的区别
若您是使用旧版 API 或是 Web 页面中的『 创建集群(旧版) 』选项创建的集群,则应继续使用旧版API进行操作;
若您是使用新版 API 或是 Web 页面中的『 创建集群 』选项创建的集群,则应继续使用新版 API 进行操作。
两个版本的 API 互不兼容,旧版的 API 目前已经停止维护。
我们强烈建议您使用新版集群。
Cluster 接口
接口 | 请求方式 | 描述 |
---|---|---|
/v2/cluster | POST | 创建 CCE K8S 集群 |
/v2/clusters | GET | 查询 CCE K8S 集群列表 |
/v2/cluster/{clusterID} | GET | 查询指定集群详情 |
/v2/cluster/{clusterID} | DELETE | 删除指定集群 |
InstanceGroup 接口
接口 | 请求方式 | 说明 |
---|---|---|
/v2/cluster/{clusterID}/instancegroup | POST | 创建节点组 |
/v2/cluster/{clusterID}/instancegroups | GET | 获取集群的节点组列表 |
/v2/cluster/{clusterID}/instancegroup/{instanceGroupID} | GET | 获取节点组详情 |
/v2/cluster/{clusterID}/instancegroup/{instanceGroupID}/replicas | PUT | 修改节点组节点副本数 |
/v2/cluster/{clusterID}/instancegroup/{instanceGroupID}/autoscaler | PUT | 修改节点组节点自动扩缩容配置 |
/v2/cluster/{clusterID}/instancegroup/{instanceGroupID} | DELETE | 删除节点组 |
Instance 接口
接口 | 请求方式 | 说明 |
---|---|---|
/v2/cluster/{clusterID}/instances | POST | 创建节点(集群扩容) |
/v2/cluster/{clusterID}/instance/{instanceID} | GET | 获取节点详情 |
/v2/cluster/{clusterID}/instances | GET | 获取集群节点列表 |
/v2/cluster/{clusterID}/instancegroup/{instanceGroupID}/instances | GET | 获取节点组节点列表 |
/v2/cluster/{clusterID}/instance/{instanceID} | PUT | 更新节点属性 |
/v2/cluster/{clusterID}/instances | PUT | 删除节点(集群缩容) |
Network 接口
接口 | 请求方式 | 说明 |
---|---|---|
/v2/net/check_clusterip_cidr | POST | 检查集群 ClusterIP 网段 |
/v2/net/check_container_network_cidr | POST | 检查集群容器网络网段 |
/v2/net/recommend_clusterip_cidr | POST | 推荐集群 ClusterIP 网段 |
/v2/net/recommend_container_cidr | POST | 推荐集群容器网络网段 |
Autoscaler 接口
接口 | 请求方式 | 说明 |
---|---|---|
/v2/autoscaler/{clusterID} | POST | 创建集群 Autoscaler |
/v2/autoscaler/{clusterID} | GET | 查询集群 Autoscaler 配置 |
/v2/autoscaler/{clusterID} | PUT | 更新集群 Autoscaler 配置 |
Kubeconfig 接口
接口 | 请求方式 | 说明 |
---|---|---|
/v2/kubeconfig/{clusterID}/admin/{type} | GET | 查询集群 Admin KubeConfig |