Home / API Documentation / Platform management / Clusters / Management of machinery / Delete the specified Machine

Delete the specified Machine

Requests

HTTP request

DELETE /apis/platform.tkestack.io/v1/machines/{name}

delete a Machine

Path parameters

Name Type Required Description
name string Truename of the Machine

Query parameters

Name Type Required Description
dryRun string FalseWhen 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 FalseThe 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 FalseDeprecated: 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 FalseWhether 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 FalseIf '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 FalseSee 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 FalseSee 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

Machine instance in Kubernetes cluster

{
   "apiVersion": "platform.tkestack.io/v1",
   "kind": "Machine",
   "metadata": {
     "annotations": {
       "cpaas.io/display-name": "192.168.0.104"
     },
     "creationTimestamp": "2021-06-24T02:25:45Z",
     "name": "mc-192-168-0-104",
     "resourceVersion": "2078561",
     "selfLink": "/apis/platform.tkestack.io/v1/machines/mc-192-168-0-104",
     "uid": "719f0a5b-a730-41e3-8c15-1572675b6423"
   },
   "spec": {
     "clusterName": "global",
     "displayName": "",
     "finalizers": [
       "machine"
     ],
     "ip": "192.168.0.104",
     "ipv6": "",
     "networkDevice": "",
     "port": 22,
     "proxy": {},
     "publicIP": "",
     "role": "",
     "type": "Baremetal",
     "username": "root"
   },
   "status": {
     "conditions": [
       {
         "lastProbeTime": "2021-07-01T09:14:06Z",
         "lastTransitionTime": "2021-06-24T02:26:34Z",
         "status": "True",
         "type": "HealthCheck"
       }
     ],
     "machineInfo": {},
     "phase": "Terminating"
   }
 }

Parameters

Name Type Description
apiVersion string See common parameters
kind string See common parameters
metadata object See common parameters
spec object MachineSpec is a description of machine.
Path: spec
spec.clusterName string cluster name
Path: spec.clusterName
spec.displayName string displayName
Path: spec.displayName
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.ip string ip
Path: spec.ip
spec.ipv6 string ipv6
Path: spec.ipv6
spec.networkDevice string networkDevice
Path: spec.networkDevice
spec.port integer (int32) port
Path: spec.port
spec.proxy object MachineProxy is the proxy to connect Machine's ssh.
Path: spec.proxy
spec.publicIP string publicIP
Path: spec.publicIP
spec.role string master/node
Path: spec.role
spec.type string type
Path: spec.type
spec.username string user name
Path: spec.username
status object MachineStatus represents information about the status of an machine.
Path: status
status.conditions array machine condition
Path: status.conditions
status.conditions[] object MachineCondition contains details for the current condition of this Machine.
Path: status.conditions[]
conditions[].lastProbeTime string (date-time) Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
Path: status.conditions[].lastProbeTime
conditions[].lastTransitionTime string (date-time) Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
Path: status.conditions[].lastTransitionTime
conditions[].status string Status is the status of the condition. Can be True, False, Unknown.
Path: status.conditions[].status
conditions[].type string Type is the type of the condition.
Path: status.conditions[].type
status.machineInfo object MachineSystemInfo is a set of ids/uuids to uniquely identify the node.
Path: status.machineInfo
status.phase string machine phase
Path: status.phase

Other status codes

Status code: 202

Accepted

Status code: 401

Unauthorized