Deletes the specified cluster
Requests
HTTP request
DELETE /apis/platform.tkestack.io/v1/clusters/{name}
delete a Cluster
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | True | name of the Cluster |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| dryRun | string | False | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
| gracePeriodSeconds | integer | False | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. |
| orphanDependents | boolean | False | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. |
| propagationPolicy | string | False | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. |
| pretty | string | False | If 'true', then the output is pretty printed. |
Request body
Content-Type
*/*
Sample request
DeleteOptions may be provided when deleting an API object.
{
"apiVersion": "",
"dryRun": [
""
],
"gracePeriodSeconds": 1,
"kind": "",
"orphanDependents": false,
"preconditions": {
"resourceVersion": "",
"uid": ""
},
"propagationPolicy": ""
}Parmeters
| Name | Type | Required | Description |
|---|---|---|---|
| apiVersion | string | False | See common parameters |
| dryRun | array | False |
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
Path: dryRun |
| dryRun[] | string | False |
Path: dryRun[] |
| gracePeriodSeconds | integer (int64) | False |
The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
Path: gracePeriodSeconds |
| kind | string | False | See common parameters |
| orphanDependents | boolean | False |
Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
Path: orphanDependents |
| preconditions | object | False |
Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
Path: preconditions |
| preconditions.resourceVersion | string | False |
Specifies the target ResourceVersion
Path: preconditions.resourceVersion |
| preconditions.uid | string | False |
Specifies the target UID.
Path: preconditions.uid |
| propagationPolicy | string | False |
Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
Path: propagationPolicy |
Responses
Content-Type
application/json,
application/yaml,
application/vnd.kubernetes.protobuf
Status code: 200
OK
Sample response
Cluster is a Kubernetes cluster in
{
"apiVersion": "platform.tkestack.io/v1",
"kind": "Cluster",
"metadata": {
"annotations": {
"cpaas.io/container-runtime": "docker://20.10.7",
"cpaas.io/network-type": "kube-ovn",
"kube-ovn.cpaas.io/join-cidr": "100.64.0.0/16",
"kube-ovn.cpaas.io/transmit-type": "overlay",
"platform.tkestack.io/galaxy-ipam-ip": "10.7.0.8",
"platform.tkestack.io/gpu-quota-admission-ip": "10.7.0.9"
},
"creationTimestamp": "2021-09-23T02:14:22Z",
"deletionTimestamp": "2021-10-12T03:54:02Z",
"labels": {
"cluster-type": "Baremetal",
"cpaas.io/arch": "amd64",
"cpaas.io/arch-amd64": "true",
"cpaas.io/node-arch-constraint": "amd64",
"cpaas.io/region-component": "deploying"
},
"managedFields": [
{
"apiVersion": "platform.tkestack.io/v1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:annotations": {
".": {},
"f:cpaas.io/container-runtime": {},
"f:cpaas.io/network-type": {},
"f:kube-ovn.cpaas.io/join-cidr": {},
"f:kube-ovn.cpaas.io/transmit-type": {}
},
"f:labels": {
".": {},
"f:cpaas.io/node-arch-constraint": {}
}
},
"f:spec": {
"f:clusterCIDR": {},
"f:displayName": {},
"f:features": {
"f:enableMasterSchedule": {},
"f:ha": {
".": {},
"f:thirdParty": {
".": {},
"f:vip": {},
"f:vport": {}
}
},
"f:ipvs": {},
"f:upgrade": {
"f:mode": {},
"f:strategy": {
"f:drainNodeBeforeUpgrade": {},
"f:maxUnready": {}
}
}
},
"f:networkDevice": {},
"f:serviceCIDR": {},
"f:type": {},
"f:version": {}
},
"f:status": {
"f:phase": {}
}
},
"manager": "Mozilla",
"operation": "Update",
"time": "2021-09-23T02:14:22Z"
},
{
"apiVersion": "platform.tkestack.io/v1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:labels": {
"f:cluster-type": {},
"f:cpaas.io/arch": {},
"f:cpaas.io/arch-amd64": {},
"f:cpaas.io/region-component": {}
}
}
},
"manager": "cluster-transformer",
"operation": "Update",
"time": "2021-09-23T02:23:14Z"
},
{
"apiVersion": "platform.tkestack.io/v1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:annotations": {
"f:platform.tkestack.io/galaxy-ipam-ip": {},
"f:platform.tkestack.io/gpu-quota-admission-ip": {}
}
},
"f:spec": {
"f:clusterCredentialRef": {
".": {},
"f:name": {}
}
},
"f:status": {
"f:addresses": {
".": {},
"k:{\"type\":\"Advertise\"}": {
".": {},
"f:host": {},
"f:path": {},
"f:port": {},
"f:type": {}
},
"k:{\"type\":\"Real\"}": {
".": {},
"f:host": {},
"f:path": {},
"f:port": {},
"f:type": {}
}
},
"f:clusterCIDR": {},
"f:conditions": {
".": {},
"k:{\"type\":\"EnsureCNI\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureCleanupCluster\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureCleanupScript\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureClusterComplete\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureContainerRuntime\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureCopyFiles\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureCreateClusterMark\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureGPUManager\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureInitMaster\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureJoin\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureKubeNode\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureKubeconfig\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureNodeHostname\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureNvidiaDevicePlugin\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsurePostClusterInstallHook\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsurePostInstallHook\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsurePreClusterInstallHook\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsurePreInstallHook\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsurePrepareNode\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureRenewCertsService\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureRenewFirstMasterCerts\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureStoreCredential\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureUpdateCISConfiguration\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:status": {},
"f:type": {}
},
"k:{\"type\":\"EnsureWaitClusterModuleReady\"}": {
".": {},
"f:lastProbeTime": {},
"f:lastTransitionTime": {},
"f:message": {},
"f:reason": {},
"f:status": {},
"f:type": {}
}
},
"f:dnsIP": {},
"f:message": {},
"f:nodeCIDRMaskSize": {},
"f:reason": {},
"f:serviceCIDR": {}
}
},
"manager": "tke-platform-controller",
"operation": "Update",
"time": "2021-10-12T03:43:10Z"
}
],
"name": "chaolei",
"resourceVersion": "41882549",
"selfLink": "/apis/platform.tkestack.io/v1/clusters/chaolei",
"uid": "465c36c6-0648-4df0-8248-60729a8d617c"
},
"spec": {
"clusterCIDR": "10.3.0.0/16",
"clusterCredentialRef": {
"name": "cc-hd286fs5"
},
"displayName": "chaolei",
"dnsDomain": "cluster.local",
"etcd": {
"local": {
"dataDir": "",
"serverCertSANs": [
"etcd"
]
}
},
"features": {
"enableMasterSchedule": true,
"ha": {
"thirdParty": {
"vip": "192.168.130.82",
"vport": 6443
}
},
"ipvs": true,
"skipConditions": [
"EnsureNvidiaDriver",
"EnsureMetricsServer"
],
"upgrade": {
"mode": "Auto",
"strategy": {
"drainNodeBeforeUpgrade": false,
"maxUnready": 0
}
}
},
"finalizers": [
"cluster"
],
"networkDevice": "eth0",
"properties": {
"maxNodePodNum": 256
},
"serviceCIDR": "10.7.0.0/16",
"tenantID": "",
"type": "Baremetal",
"version": "1.21.4"
},
"status": {
"addresses": [
{
"host": "192.168.130.82",
"path": "",
"port": 6443,
"type": "Real"
},
{
"host": "192.168.130.82",
"path": "",
"port": 6443,
"type": "Advertise"
}
],
"clusterCIDR": "10.3.0.0/16",
"conditions": [],
"dnsIP": "10.7.0.10",
"message": "",
"nodeCIDRMaskSize": 24,
"phase": "Terminating",
"reason": "",
"resource": {},
"serviceCIDR": "10.7.0.0/16",
"version": ""
}
}Parameters
| Name | Type | Description |
|---|---|---|
| apiVersion | string | See common parameters |
| kind | string | See common parameters |
| metadata | object | See common parameters |
| spec | object |
ClusterSpec is a description of a cluster.
Path: spec |
| spec.clusterCIDR | string |
ClusterCIDR is used to set a separated CIDR for k8s pod
Path: spec.clusterCIDR |
| spec.clusterCredentialRef | object |
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
Path: spec.clusterCredentialRef |
| clusterCredentialRef.name | string |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
Path: spec.clusterCredentialRef.name |
| spec.displayName | string |
DisplayName is the display name of the cluster.
Path: spec.displayName |
| spec.dnsDomain | string |
DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local".
Path: spec.dnsDomain |
| spec.etcd | object |
Etcd contains elements describing Etcd configuration.
Path: spec.etcd |
| etcd.local | object |
LocalEtcd describes that kubeadm should run an etcd cluster locally
Path: spec.etcd.local |
| local.dataDir | string |
DataDir is the directory etcd will place its data. Defaults to "/var/lib/etcd".
Path: spec.etcd.local.dataDir |
| local.serverCertSANs | array |
ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert.
Path: spec.etcd.local.serverCertSANs |
| local.serverCertSANs[] | string |
Path: spec.etcd.local.serverCertSANs[] |
| spec.features | object |
ClusterFeature records the features that are enabled by the cluster.
Path: spec.features |
| features.enableMasterSchedule | boolean |
enable master node schedule or not
Path: spec.features.enableMasterSchedule |
| features.ha | object |
Path: spec.features.ha |
| ha.thirdParty | object |
Path: spec.features.ha.thirdParty |
| thirdParty.vip | string |
virtual IP of the HA
Path: spec.features.ha.thirdParty.vip |
| thirdParty.vport | integer (int32) |
virtual port of the HA
Path: spec.features.ha.thirdParty.vport |
| features.ipvs | boolean |
ipvs on-off
Path: spec.features.ipvs |
| features.skipConditions | array |
SkipConditions is a set of conditions that needs to be skipped
Path: spec.features.skipConditions |
| features.skipConditions[] | string |
Path: spec.features.skipConditions[] |
| features.upgrade | object |
Path: spec.features.upgrade |
| upgrade.mode | string |
Upgrade mode, default value is Auto.
Path: spec.features.upgrade.mode |
| upgrade.strategy | object |
UpgradeStrategy used to control the upgrade process.
Path: spec.features.upgrade.strategy |
| strategy.drainNodeBeforeUpgrade | boolean |
Whether drain node before upgrade. Draining node before upgrade is recommended. But not all pod running as cows, a few running as pets. If your pod can not accept be expelled from current node, this value should be false.
Path: spec.features.upgrade.strategy.drainNodeBeforeUpgrade |
| strategy.maxUnready | string (int-or-string) |
IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.
Path: spec.features.upgrade.strategy.maxUnready |
| spec.finalizers | array |
Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
Path: spec.finalizers |
| spec.finalizers[] | string |
Path: spec.finalizers[] |
| spec.networkDevice | string |
network device
Path: spec.networkDevice |
| spec.properties | object |
ClusterProperty records the attribute information of the cluster.
Path: spec.properties |
| properties.maxNodePodNum | integer (int32) |
max number of node pod
Path: spec.properties.maxNodePodNum |
| spec.serviceCIDR | string |
ServiceCIDR is used to set a separated CIDR for k8s service, it's exclusive with MaxClusterServiceNum.
Path: spec.serviceCIDR |
| spec.tenantID | string |
tenant id
Path: spec.tenantID |
| spec.type | string |
cluster type, baremetal or imported
Path: spec.type |
| spec.version | string |
cluster version
Path: spec.version |
| status | object |
ClusterStatus represents information about the status of a cluster.
Path: status |
| status.addresses | array |
List of addresses reachable to the cluster.
Path: status.addresses |
| status.addresses[] | object |
ClusterAddress contains information for the cluster's address.
Path: status.addresses[] |
| addresses[].host | string |
The cluster address.
Path: status.addresses[].host |
| addresses[].path | string |
path
Path: status.addresses[].path |
| addresses[].port | integer (int32) |
port
Path: status.addresses[].port |
| addresses[].type | string |
Cluster address type, one of Public, ExternalIP or InternalIP.
Path: status.addresses[].type |
| status.clusterCIDR | string |
ClusterCIDR is used to set a separated CIDR for k8s pod
Path: status.clusterCIDR |
| status.conditions | array |
cluster conditions
Path: status.conditions |
| status.dnsIP | string |
dns ip
Path: status.dnsIP |
| status.message | string |
A human readable message indicating details about why the cluster is in this condition.
Path: status.message |
| status.nodeCIDRMaskSize | integer (int32) |
node CIDR mask size
Path: status.nodeCIDRMaskSize |
| status.phase | string |
cluster phase
Path: status.phase |
| status.reason | string |
A brief CamelCase message indicating details about why the cluster is in this state.
Path: status.reason |
| status.resource | object |
ClusterResource records the current available and maximum resource quota information for the cluster.
Path: status.resource |
| status.serviceCIDR | string |
ServiceCIDR is used to set a separated CIDR for k8s service, it's exclusive with MaxClusterServiceNum.
Path: status.serviceCIDR |
| status.version | string |
cluster version
Path: status.version |