REST API - enter_maintenance_mode

vcenter namespace management nodes: enter maintenance mode

Enter Namespaces maintenance mode on the node. This operation removes Kubernetes pods from the given node and prevents further scheduling of pods on the node. This operation can be cancelled by calling exitMaintenanceMode operation on the node.

Request:

HTTP request

POST https://{server}/rest/vcenter/namespace-management/clusters/{cluster}/nodes?action=enter_maintenance_mode

Path Parameters

Name Type Description
Required
cluster string Identifier for the cluster.

Request Body Structure:

{
    "node"{
        "node_type""string",
        "node_id""obj-103"
    },
    "action""PermanentNodeRemoval"
}

Request Body Parameters:

Name Type Description
bold = required
node node_identity Identity for the node.
node.node_type string Type for the node.

When clients pass a value of this structure as a parameter, the field must be one of HostSystem or VirtualMachine. When operations return a value of this structure as a result, the field will be one of HostSystem or VirtualMachine.

node.node_id string Identifier for the node.

When clients pass a value of this structure as a parameter, the field must be an identifier for one of these resource types: HostSystem or VirtualMachine. When operations return a value of this structure as a result, the field will be an identifier for one of these resource types: HostSystem or VirtualMachine.

action string Optional. Optional action to be taken when node enters maintenance mode. no_action is used as the default action type when this parameter is not provided.

Response:

HTTP Status Code: 200

Representation:

{
    "value""obj-103"
}

Response Type:

Name Type Description
bold = required
value string The task identifier for the operation. The task is not cancellable.

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
400 already_in_desired_state if node is already in the desired state.
404 not_found if @param.name cluster} is not enabled for Namespaces.
400 unsupported if vcenter.namespace_management.nodes.node_identity.node_type is not of type
400 invalid_element_configuration if node is not a member of cluster.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user is not vpxd solution user.