DeleteCluster
In this article:
DeleteCluster#
Description#
Deletes a cluster.
Request Syntax#
DELETE /clusters/name HTTP/1.1
URI Request Parameters#
The request uses the following URI parameters.
name — The cluster name.
Type: String
Required: Yes
Request Parameters#
Request body is absent.
Response Syntax#
HTTP/1.1 200
Content-type: application/json
{
"cluster": {
"name": "string",
"createdAt": number,
"version": "string",
"status": "string",
"resourcesVpcConfig": {
"securityGroupIds": [ "string" ],
"subnetIds": [ "string" ],
"vpcId": "string"
},
"certificateAuthority": {
"data": "string",
},
"remoteAccessConfig": {
"ec2SshKey": "string",
},
"kubernetesNetworkConfig": {
"ipFamily": "string",
"serviceIpv4Cidr": "string",
"podIpv4Cidr": "string",
},
"health": {
"issues": [
{
"code": "string",
"message": "string",
"resourceIds": [ "string" ]
}
]
},
"platformVersion": "string",
"legacyClusterParams": {
"masterConfig": {
"highAvailability": boolean,
"mastersInstanceType": "string",
"mastersVolumeType": "string",
"mastersVolumeSize": number,
"mastersVolumeIops": number,
"masterPublicIp": "string",
},
"ingressConfig": {
"ingressRequired": boolean,
"ingressPublicIp": "string",
"ingressInstanceType": "string",
"ingressVolumeType": "string",
"ingressVolumeSize": number,
"ingressVolumeIops": number,
},
"dockerRegistryConfig": {
"dockerRegistryRequired": boolean,
"dockerRegistryVolumeType": "string",
"dockerRegistryVolumeSize": number,
"dockerRegistryVolumeIops": number,
},
"ebsProviderConfig": {
"ebsProviderRequired": boolean,
"ebsUser": "string",
},
"userDataConfig": {
"userData": "string",
"userDataContentType": "string",
}
},
"tags": {
"string" : "string"
},
}
}
Response Elements#
cluster — Describes the cluster.
Type: Cluster object
Examples#
boto3 K2 Cloud boto3 Client
import boto3
session = boto3.Session(
aws_access_key_id="<AWS_ACCESS_KEY_ID>",
aws_secret_access_key="<AWS_SECRET_ACCESS_KEY>",
region_name="",
)
eks_client = session.client(
'eks',
endpoint_url='https://eks.k2.cloud/',
)
eks_client.delete_cluster(name="production")
c2-eks K2 Cloud API Client
c2-eks DeleteCluster name production
aws-cli
aws eks --endpoint https://eks.k2.cloud/ delete-cluster --name production