# CLI Detach Node

The `pf9ctl detach-node` command will detach a node from any cluster it is currently attached to. Detaching the node from a cluster allows the user to reattach it to another cluster. To employ this action, run the `pf9ctl detach-node` command. This action also supports passing a list of node IPs to detach via an additional flag. If the flag is not supplied, the command will detach the node on which it was executed.

## Syntax Example

{% tabs %}
{% tab title="Bash" %}

```bash
pf9ctl detach-node [flags]
```

{% endtab %}
{% endtabs %}

## All Available Commands and Flags

{% tabs %}
{% tab title="Bash" %}

```bash
pf9ctl detach-node --help
Detach nodes from their clusters. If no nodes are passed it will detach the node on which the command was run.

Usage:
  pf9ctl detach-node [flags]

Flags:
  -h, --help              help for detach-node
      --mfa string        MFA token
  -n, --node-ip strings   node ip address

Global Flags:
      --no-prompt   disable all user prompts
      --verbose     print verbose logs
```

{% endtab %}
{% endtabs %}

## Command Examples

{% tabs %}
{% tab title="Bash" %}

```bash
pf9ctl detach-node
✓ Loaded Config Successfully
Starting detaching process
2021-11-08T08:35:14.1182Z	INFO	Node [9cfe32a2-6518-4b63-a55b-f9a9c1148e6a] detached from cluster
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Bash" %}

```bash
#pf9ctl detach-node -n ip
✓ Loaded Config Successfully
Starting detaching process
2021-11-08T08:35:14.1182Z	INFO	Node [9cfe32a2-6518-4b63-a55b-f9a9c1148e6a] detached from cluster
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Bash" %}

```bash
#pf9ctl detach-node -n ip1,ip2
✓ Loaded Config Successfully
Starting detaching process
2021-11-08T08:35:14.1182Z	INFO	Node [9cfe32a2-6518-4b63-a55b-f9a9c1148e6a] detached from cluster
2021-11-08T08:35:14.1182Z	INFO	Node [691a9feb-6b62-4235-bf27-208a14744843	 detached from cluster
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/managed-kubernetes/5.14/pmk-cli/pmk-cli-commands/cli-detach-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
