# Deploy KubeAtlas with an AI agent Deploy **KubeAtlas Hub** first. Use the Hub to install **KubeAtlas Agent** in each cluster you want to connect. Share this [raw Markdown runbook](https://raw.githubusercontent.com/maomada/KubeAtlas/main/docs/deploy-with-ai.md) with your AI agent. > Use this runbook to deploy KubeAtlas Hub with `` on ``. Serve it at `` and connect ``. Tell me the installed version, HTTPS address, and what you verified. I will create the first administrator in my browser and approve the pairing in Hub. ## 1. Choose how to deploy Hub Use a Linux `amd64` or `arm64` host or node. For a new deployment, use the [latest stable release](https://github.com/maomada/KubeAtlas/releases/latest). Keep the Hub, chart, and Agent artifacts on the same release version. | Deployment method | What to prepare | | --- | --- | | [Helm](../deploy/helm/kubeatlas-portal/README.md) | A Kubernetes context for Hub, persistent storage, and an HTTPS Ingress or reverse proxy. | | [DEB or RPM](#install-a-deb-or-rpm) | A Linux systemd host, the package for its architecture, and an HTTPS reverse proxy. | | [Docker Compose](../deploy/compose/README.md) | A Linux container host and an HTTPS reverse proxy. | Use a dedicated HTTPS root address, such as `https://hub.example.com`. The registration shell and every eligible node must be able to reach it and trust its certificate. Pass the whole origin to Hub with the original `Host` header, WebSocket upgrades on `/agent`, and streaming responses on `/mcp`. Serve `/api/`, `/downloads/agent/`, and `/v2/` without rewriting paths or redirecting. If a private CA is used, configure trust on the registration host and in each node's container runtime. [HTTPS and Agent trust](hub-agent-onboarding.md#configure-lan-and-public-addresses) After a fresh Hub starts, open its HTTPS address and create the platform administrator using the one-time setup code. Each deployment guide shows how to obtain the code on the host or from the Hub Pod. The operator should enter the code and password directly in the browser. Agent onboarding is available once setup completes. For an existing Hub, keep its listener, state location, and credentials, and take a verified backup before changing the release. Preserve the previous Agent image catalog while any Agent still uses it. [Hub state and recovery](hub-state.md) · [Retaining a previous catalog](hub-agent-onboarding.md#retain-a-previous-catalog) ### Install a DEB or RPM Use the package for your Linux architecture. With the complete package, `apt` or `dnf` installs the Hub binary, systemd service, and matching Agent catalog in one operation. Follow the [package installation guide](packaging.md#install) to set the HTTPS origin, read the one-time setup code, and confirm that the service is ready. Before replacing an existing service, check the [package upgrade and migration guide](packaging.md#upgrade-and-migration). ## 2. Connect a cluster 1. Open the Hub HTTPS address and sign in. Check that the connection address matches the intended endpoint under **Hub connection addresses**. 2. In the intended organization, select **Clusters → Connect cluster** (`集群 → 连接集群`). Check `kubectl config current-context` on the registration host and run the generated command. Confirm the displayed cluster identity, then approve its matching code in Hub. 3. Confirm the cluster is **Connected** in Hub and open nodes or namespaces to verify access. Report the Hub version, Agent version, and connected cluster ID. [Registration prerequisites and recovery](hub-agent-onboarding.md#bootstrap-a-new-cluster) Official Hub releases starting with v0.1.5 include the OpenCost offline chart and exporter. When connecting a cluster, the installer checks for a compatible Prometheus and prepares the offline package. Leave the final **Install OpenCost** action on the Cost page for the operator to confirm. [Prometheus requirements and existing Agents](opencost-offline.md) For deployments using custom service configuration or a private mirror, see [Hub configuration](portal.md#deployment-and-security) and [private Agent catalogs](hub-agent-onboarding.md#prepare-a-private-bundle).