Cluster
# List Cluster Information
Request
GET /openapi/system/cluster
1
Success Response Description
| Type | Description |
|---|---|
| []OpenAPICluster | Cluster information list |
OpenAPICluster Parameter Description
| Parameter Name | Description | Type |
|---|---|---|
cluster_id | Cluster ID | string |
name | Cluster name | string |
description | Description | string |
provider | Provider:0:Standard Kubernetes cluster1:Alibaba Cloud ACK2:Tencent Cloud TKE3:Huawei Cloud CCE4:Amazon EKS5:Tencent Cloud TKE Serverless6:Google Cloud GKE7:Microsoft Cloud AKS | int |
provider_name | Provider name | string |
production | Whether it's a production cluster | bool |
created_by | Creator | string |
created_time | Creation time | int |
local | Whether it's a local cluster | bool |
status | Cluster status:normal:Normaldisconnected:Disconnectedpending:Pendingabnormal:Connection abnormal | string |
type | Cluster type:agent:Agent modekubeconfig:Direct connection mode | string |
Success Response Example
[
{
"cluster_id": "0123456789****ef12345678",
"name": "local-20220823144517",
"production": true,
"description": "",
"provider": 0,
"provider_name": "Standard Kubernetes Cluster",
"created_by": "system",
"created_time": 1661237117,
"local": true,
"status": "normal",
"type": "agent"
},
{
"cluster_id": "64b80b03f****553e5707fef",
"name": "tt",
"production": false,
"description": "",
"provider": 4,
"provider_name": "Amazon EKS",
"created_by": "admin",
"created_time": 1689783043,
"local": false,
"status": "pending",
"type": "agent"
}
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Create Cluster
Request
POST /openapi/system/cluster
1
Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
name | Cluster name | string | Yes |
type | Cluster type:agent:Agent modekubeconfig:Direct connection mode | string | Yes |
kube_config | Kubeconfig configuration, can be empty when type is agent | string | Yes |
production | Whether it's a production cluster | bool | Yes |
provider | Provider:0:Standard Kubernetes cluster1:Alibaba Cloud ACK2:Tencent Cloud TKE3:Huawei Cloud CCE4:Amazon EKS5:Tencent Cloud TKE Serverless6:Google Cloud GKE7:Microsoft Cloud AKS | int | Yes |
description | Cluster description | string | Yes |
project_names | Project scope that can use this cluster, use <all_projects> to set all projects | []string | Yes |
Success Response Description
| Parameter Name | Type | Description |
|---|---|---|
cluster | OpenAPICluster | Cluster information |
agent_cmd | string | Agent access command, only valid when type is agent |
Success Response Example
{
"cluster": {
"cluster_id": "0123456789****ef12345678",
"name": "local-20220823144517",
"production": true,
"description": "",
"provider": 0,
"provider_name": "Standard Kubernetes Cluster",
"created_by": "system",
"created_time": 1661237117,
"local": true,
"status": "normal",
"type": "agent"
},
"agent_cmd": "kubectl apply -f \"http://course.8slan.com/api/aslan/cluster/agent/6657ee912d51d34e253e503f/agent.yaml?type=deploy\""
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Update Specified Cluster
Request
PUT /openapi/system/cluster/:id
1
Path Parameter Description
| Parameter Name | Type | Description | Required | Default |
|---|---|---|---|---|
id | string | Cluster primary key | Yes | None |
Body Parameter Description
| Parameter Name | Description | Type | Required |
|---|---|---|---|
name | Cluster name | string | Yes |
description | Cluster description | string | Yes |
project_names | Project scope that can use this cluster, use <all_projects> to set all projects | []string | Yes |
Body Parameter Example
{
"name": "local-20220823144517-new",
"description": "Local Cluster",
"project_names": [
"<all_projects>",
]
}
1
2
3
4
5
6
7
2
3
4
5
6
7
Success Response Description
{message: "success"}
1
# Delete Specified Cluster
Request
DELETE /openapi/system/cluster/:id
1
Path Parameter Description
| Parameter Name | Type | Description | Required | Default |
|---|---|---|---|---|
id | string | Cluster primary key | Yes | None |
Success Response Description
{message: "success"}
1
# Check Cluster Istio Installation
Request
GET /openapi/cluster/istio/check/:id
1
Path Parameter Description
| Parameter Name | Type | Description | Required | Default |
|---|---|---|---|---|
id | string | Cluster primary key | Yes | None |
Success Response Description
true
1


