# How to Manage a Kubernetes Cluster

Source: https://docs.quake.ai/docs/kubernetes/how-to/manage-cluster
Markdown: https://docs.quake.ai/docs/kubernetes/how-to/manage-cluster.md

---

# How to manage a Kubernetes cluster

Scale worker nodes, view cluster status, retrieve the kubeconfig for `kubectl` access, and delete clusters when no longer needed. The Clusters list page exposes a filter input on the far right of the toolbar with placeholder text **Multiple filter tags are separated by enter**; use it to locate a specific cluster by name.

<PrerequisiteBlock methods={["console", "cli"]}>

- An existing [Kubernetes cluster](/docs/kubernetes/how-to/create-cluster) in `CREATE_COMPLETE` or `UPDATE_COMPLETE` status
- For CLI management: the `python-magnumclient` package installed (`pip install python-magnumclient`)

</PrerequisiteBlock>

## View cluster status

<MethodTabs>
<Method label="Console">

<NoMoreButton />

1. Select **Kubernetes** > **Clusters** from the top-level navigation.
2. The list shows five columns in this order: **ID/Name**, **Status**, **Health Status**, **Keypair**, **Action**. An unlabelled checkbox column on the left selects rows for the toolbar's bulk **Delete** action. Node counts and timestamps live on the cluster detail page rather than the list. Per-row actions live behind the **Settings** gear icon in the **Action** column. The dropdown's contents depend on cluster state: while the cluster is in `CREATE_IN_PROGRESS`, only **Get kube.config** is shown; once the cluster reaches `CREATE_COMPLETE` or `CREATE_FAILED`, the full dropdown lists three items in order: **Delete**, **Resize Cluster**, **Get kube.config**.
3. The toolbar above the list renders six controls in this order:

   | Control | Behavior |
   |---|---|
   | sync (icon-only) | Refreshes the list. |
   | **Create Cluster** | Opens the Create Cluster wizard. |
   | **Delete** (text button) | Bulk-deletes the rows selected via the checkbox column. Disabled when zero rows are selected. Distinct from the per-row gear-menu **Delete**. |
   | eye (icon-only) | Show or hide columns and the row-details preview. |
   | download (icon-only) | Exports the list (CSV or JSON). |
   | pause-circle (icon-only) | Icon-only control; behavior is not documented upstream. |

4. Select a cluster name to open its detail page. The detail page surfaces the API address, the cluster template, **Number of Master Nodes** and **Number of Nodes** (separate fields, not a combined node count), labels, fault information, and the **Created At** and **Updated At** timestamps.

</Method>
<Method label="CLI">

List all clusters:

```bash
openstack coe cluster list
```

The output is a seven-column table: `uuid`, `name`, `keypair`, `node_count`, `master_count`, `status`, `health_status`.

View details for a specific cluster:

```bash
openstack coe cluster show MY_CLUSTER_NAME
```

Key fields in the output:

| Field | Description |
|---|---|
| `status` | Current state: `CREATE_COMPLETE`, `UPDATE_IN_PROGRESS`, `DELETE_IN_PROGRESS`, etc. |
| `health_status` | Cluster health based on node checks. |
| `node_count` | Current number of worker nodes. |
| `master_count` | Number of master nodes. |
| `api_address` | Kubernetes API endpoint URL. |
| `created_at` / `updated_at` | Cluster creation and most recent update timestamps. |
| `status_reason` | Additional detail when status indicates a failure. |

</Method>
</MethodTabs>

## Access the cluster with kubectl

<MethodTabs>
<Method label="Console">

The Console exposes the kubeconfig file as a per-row action on the Clusters list:

1. Select **Kubernetes** > **Clusters**.
2. Find the cluster you want kubectl access to. On its row, open the **Settings** gear icon dropdown and select **Get kube.config** (verbatim label, including the dot and the lowercase `c`). Selecting the item triggers an immediate browser download; there is no intermediate dialog. The downloaded file is plain-text YAML.
3. Move the downloaded file to a known location and export it as `KUBECONFIG`:

```bash
export KUBECONFIG=/path/to/downloaded/kube.config
```

4. Verify connectivity:

```bash
kubectl get nodes
```

All master and worker nodes should show `Ready` status.

</Method>
<Method label="CLI">

1. Retrieve the kubeconfig file:

```bash
openstack coe cluster config MY_CLUSTER_NAME
```

2. The command outputs an `export KUBECONFIG=...` command. Run it to configure your shell:

```bash
export KUBECONFIG=/path/to/config
```

3. Verify connectivity:

```bash
kubectl get nodes
```

All master and worker nodes should show `Ready` status.

4. Deploy workloads with standard Kubernetes commands:

```bash
kubectl create deployment nginx --image=nginx
kubectl expose deployment nginx --type=LoadBalancer --port=80
```

</Method>
</MethodTabs>

## Scale worker nodes

<MethodTabs>
<Method label="Console">

1. Select **Kubernetes** > **Clusters**.
2. Find the cluster you want to scale. On its row, open the **Settings** gear icon dropdown and select **Resize Cluster**.
3. The **Resize Cluster** dialog opens with two read-only fields (**Current Master Node** and **Current Node Count**), an editable **Changed Node Count** input pre-filled with `2`, and an **Instance Quota** gauge on the right side. Enter the new worker node count.
4. Select **OK**.

The cluster status changes to **UPDATE_IN_PROGRESS**. New worker VMs are provisioned (or removed) as Compute instances. The status returns to **UPDATE_COMPLETE** when scaling finishes.

</Method>
<Method label="CLI">

Resize the cluster to a new worker node count:

```bash
openstack coe cluster resize MY_CLUSTER_NAME NODE_COUNT
```

For example, to scale to 2 worker nodes:

```bash
openstack coe cluster resize MY_CLUSTER_NAME 2
```

Magnum accepts `0` as a valid `NODE_COUNT`, which leaves the master running with no workers. Useful for cost control on dev clusters; less common than the AWS EKS / GKE / AKS / DOKS minimum of 1.

Monitor the update:

```bash
openstack coe cluster show MY_CLUSTER_NAME -f value -c status
```

Wait until the status returns to `UPDATE_COMPLETE`.



A default-tier Quake AI project has `compute_units = 8000`. The Magnum master flavor (`c2a.xlarge`, 4000 compute units) plus each worker (`c2a.large`, 2000 compute units) plus any other instances in the project share that pool. A 5-worker cluster on the default worker flavor needs at least 14000 compute units for the cluster, before any baseline workloads. Verify quota with `openstack quota show --usage` and request a Compute Service quota increase before scaling beyond what the project can hold.





Master nodes cannot be scaled after cluster creation. If you need high availability, create the cluster with 3 master nodes from the start.



</Method>
</MethodTabs>

## Delete a cluster

Deleting a cluster removes its VMs, networks, control-plane endpoints, routers, and underlying Automation (Heat) stack.



Cluster deletion is irreversible. Back up any data stored on persistent volumes before deleting. Volumes created through Kubernetes PersistentVolumeClaims with `reclaimPolicy: Delete` are removed with the cluster.





**No name-typing safeguard.** The Cloud Console **Delete Cluster** dialog confirms with a single click. The dialog body reads `Are you sure to delete cluster (instance: <cluster-name>)?` and exposes only **Cancel** and **Confirm** buttons; the Console does not require typing the cluster name to confirm. Read the cluster name in the dialog body carefully before selecting **Confirm**.



<MethodTabs>
<Method label="Console">

1. Select **Kubernetes** > **Clusters**.
2. Find the cluster you want to delete. On its row, open the **Settings** gear icon dropdown and select **Delete**.
3. The **Delete Cluster** dialog opens. Select **Confirm** to delete the cluster.

The cluster status changes to **DELETE_IN_PROGRESS**. The Kubernetes service removes the associated VMs, networks, and control-plane endpoints automatically.

</Method>
<Method label="CLI">

```bash
openstack coe cluster delete MY_CLUSTER_NAME
```

Monitor deletion progress:

```bash
openstack coe cluster list
```

The cluster disappears from the list once deletion is complete. If deletion fails (`DELETE_FAILED`), check the status reason:

```bash
openstack coe cluster show MY_CLUSTER_NAME -f value -c status_reason
```

Common causes include orphaned resources or dependency conflicts. Resolve the blocking resource and retry the deletion.

</Method>
</MethodTabs>

## Next steps

- [Kubernetes on Quake AI](/docs/kubernetes/concepts/kubernetes): architecture, templates, and resource planning
- [How to create a cluster template](/docs/kubernetes/how-to/create-cluster-template): define reusable cluster blueprints
- [Clusters Console](/reference/kubernetes/console/clusters): monitor and manage clusters in the console
- [Kubernetes CLI reference](/reference/kubernetes/cli)
