# Kubernetes

AceCloud provides managed Kubernetes clusters powered by RKE2. The `ace k8s` command group lets you create, manage, and interact with Kubernetes clusters, node pools, and nodes from the CLI.

## Command Structure

```
ace k8s cluster list                    # List all clusters
ace k8s cluster get <name-or-id>        # Get cluster details
ace k8s cluster create ...              # Create a new cluster
ace k8s cluster delete <name-or-id>     # Delete a cluster
ace k8s cluster versions                # List available K8s versions
ace k8s cluster kubeconfig <name-or-id> # Generate kubeconfig
ace k8s cluster nodes <name-or-id>      # List nodes in a cluster
ace k8s cluster nodepool list <cluster> # List node pools
ace k8s cluster nodepool get <pool>     # Get node pool details
ace k8s cluster nodepool create ...     # Add a node pool
ace k8s cluster nodepool scale <pool>   # Scale a node pool
ace k8s cluster nodepool delete <pool>  # Delete a node pool
```

## Aliases

| Command                    | Aliases                                           |
| -------------------------- | ------------------------------------------------- |
| `ace k8s`                  | `ace kubernetes`                                  |
| `ace k8s cluster`          | `ace k8s cl`                                      |
| `ace k8s cluster nodepool` | `ace k8s cluster np`, `ace k8s cluster node-pool` |

## Prerequisites

Before creating a Kubernetes cluster, ensure you have:

1. **Authenticated** with `ace login`
2. **Selected a project** with `--project` or via config
3. **Selected a region** with `--region` or via config
4. **A flavor** for worker nodes (use `ace flavor list` to browse)
5. **A security group** (optional, use `ace security-group list`)

## Quick Start

```bash
# Check available Kubernetes versions
ace k8s cluster versions

# Check available flavors
ace flavor list

# Create a cluster with defaults
ace k8s cluster create \
  --name my-cluster \
  --version v1.32.6 \
  --flavor ACE.CPU.4C16R \
  --worker-name pool1

# Wait for provisioning, then get kubeconfig
ace k8s cluster get my-cluster
ace k8s cluster kubeconfig my-cluster > ~/.kube/config

# List nodes
ace k8s cluster nodes my-cluster
```

## Topics

* [**Clusters**](/knowledge-base/cli/kubernetes/clusters.md) -- Full cluster lifecycle: create, list, get, delete, kubeconfig, versions, and nodes
* [**Node Pools**](/knowledge-base/cli/kubernetes/node-pools.md) -- Node pool management: list, get, create, scale, and delete


---

# 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.acecloud.ai/knowledge-base/cli/kubernetes.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.
