> For the complete documentation index, see [llms.txt](https://asus-isg-aidc.gitbook.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asus-isg-aidc.gitbook.io/guide/latest/cli/commandreference/kubernetes.md).

# Kubernetes Cluster

| Developer | Last modified |
| --------- | ------------- |
| AIDC Team | 2026/08/21    |

## Table of Contents

* [1. Overview](#overview)
* [2. Subcommands](#subcommands)
* [3. Verifying the Cluster](#verifying-the-cluster)
* [4. Supported Operating Systems](#supported-operating-systems)
* [5. Deployment Workflow](#deployment-workflow)
* [6. Usage Examples](#usage-examples)
* [7. Related Commands](#related-commands)

***

## 1. Overview <a href="#overview" id="overview"></a>

{% hint style="warning" %}
**⚠️ Prerequisite: `aidc-cli init` required first**

This command depends on settings saved by [`aidc-cli init`](/guide/latest/cli/commandreference/init.md). Before running it, make sure you have completed:

* [`aidc-cli init inventory`](/guide/latest/cli/commandreference/init.md#inventory) — render the node inventory from `aidc.csv`
* SSH access to the nodes — [`aidc-cli deploy install`](/guide/latest/cli/commandreference/deploy.md) sets this up during OS deployment; for nodes that already have an OS, run [`aidc-cli deploy access-key`](/guide/latest/cli/commandreference/deploy.md) or fill the `password` column in `aidc.csv`
* [`aidc-cli init k8s-set`](/guide/latest/cli/commandreference/init.md#service-configuration) — save the Kubernetes configuration

For the full setup sequence, see the [Getting Started](/guide/latest/cli/gettingstarted.md) guide.
{% endhint %}

The `kubernetes` command deploys and manages Kubernetes clusters on target nodes.

```bash
aidc-cli kubernetes <subcommand> [flags]
```

***

## 2. Subcommands <a href="#subcommands" id="subcommands"></a>

### 2.1 `k8s-native` — Deploy Native Kubernetes

Deploys a native Kubernetes cluster using kubeadm, including control plane and worker nodes.

```bash
aidc-cli kubernetes k8s-native
```

This will:

1. Install container runtime prerequisites
2. Install kubeadm, kubelet, and kubectl
3. Initialize the Kubernetes control plane
4. Join worker nodes to the cluster
5. Deploy CNI networking plugin
6. Configure RBAC and certificates

{% hint style="info" %}
Configure Kubernetes parameters first with `aidc-cli init k8s-set` before deploying. Ensure that both the "K8s-Control plane Group" and "K8s-Data plane Group" in the inventory have been set. Inventory CSV files must be set up correctly.
{% endhint %}

***

## 3. Verifying the Cluster <a href="#verifying-the-cluster" id="verifying-the-cluster"></a>

After deployment, verify the Kubernetes cluster from a Control Plane node:

```bash
# List all worker nodes
kubectl get nodes

# View all pods across namespaces
kubectl get pods -A -o wide
```

***

## 4. Supported Operating Systems <a href="#supported-operating-systems" id="supported-operating-systems"></a>

{% hint style="info" %}
See the **Supported Platforms Matrix** for the authoritative, up-to-date list of operating systems validated for this service.
{% endhint %}

***

## 5. Deployment Workflow <a href="#deployment-workflow" id="deployment-workflow"></a>

```mermaid
flowchart TD
    A["Configure K8s Parameters<br>init k8s-set"] --> B["Deploy Container Runtime<br>container docker"]
    B --> C["Deploy K8s Cluster<br>kubernetes k8s-native"]
    C --> D["Cluster Ready"]
```

***

## 6. Usage Examples <a href="#usage-examples" id="usage-examples"></a>

```bash
# Configure and deploy Kubernetes
aidc-cli init k8s-set
aidc-cli kubernetes k8s-native
```

***

## Related Commands <a href="#related-commands" id="related-commands"></a>

| Command            | Purpose                              |
| ------------------ | ------------------------------------ |
| `init k8s-get/set` | View/set Kubernetes configuration    |
| `container docker` | Deploy Docker runtime (prerequisite) |
