# Cli Check Node

The `check node` command evaluates a node to ensure it meets the requirements for Kubernetes cluster creation. The command checks for the following particulars:

* Mandatory Checks
  * Existing pf9 packages
  * Installing missing packages
  * Sudo Access Check
  * Ports Check
  * OS Check
  * Existing Kubernetes Cluster Check
  * Check execute permissions on /tmp folder
  * Disabling swap and removing swap in fstab
* Optional Checks
  * Removal of existing pf9ctl (Python-Based CLI)
  * Resources(CPU, Disk, Memory check)

## Syntax Example

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

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

{% endtab %}
{% endtabs %}

## All Available Commands and Flags

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

```bash
pf9ctl check-node --help
Check if a node satisfies prerequisites to be ready to be added to a Kubernetes cluster. Read more
	at https://platform9.com/blog/support/managed-container-cloud-requirements-checklist/

Usage:
  pf9ctl check-node [flags]

Flags:
  -h, --help               help for check-node
  -i, --ip strings         IP address of host to be prepared
      --mfa string         MFA token
  -p, --password string    ssh password for the nodes (use 'single quotes' to pass password)
  -s, --ssh-key string     ssh key file for connecting to the nodes
  -e, --sudo-pass string   sudo password for user on remote host
  -u, --user string        ssh username for the nodes

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

{% endtab %}
{% endtabs %}

## Command Examples

### Check Local Node

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

```bash
pf9ctl check-node
2021-02-22T08:03:41.6565Z	INFO	Loading config...


Removal of existing CLI : PASS
Existing Installation Check : PASS
SudoCheck : PASS
CPUCheck : PASS
DiskCheck : FAIL
MemoryCheck : PASS
PortCheck : PASS
Node not ready. See /root/pf9/log/pf9ctl-20210222.log or use --verbose for logs
```

{% endtab %}
{% endtabs %}

### Check Remote Node

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

```bash
pf9ctl check-node -i 10.128.242.250 -u ubuntu
2021-02-22T08:06:40.5506Z	INFO	Loading config...
Enter Password:

Removal of existing CLI : PASS
Existing Installation Check : FAIL
SudoCheck : PASS
CPUCheck : PASS
DiskCheck : PASS
MemoryCheck : PASS
PortCheck : PASS
Node not ready. See /root/pf9/log/pf9ctl-20210222.log or use --verbose for logs
```

{% 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.7/pmk-cli-commands/cli-check-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.
