---
title: "Create Kubernetes cloud"
method: POST
path: "/clouds/kubernetes"
---

# Create Kubernetes cloud

`POST /clouds/kubernetes`

Connect your Kubernetes cluster to Aikido. This will register a cluster and return the agent token needed for installation. https://github.com/AikidoSec/helm-charts

## Request body

- object
  - `name` string, required — A name for this Kubernetes cluster.
  - `environment` 'production' | 'staging' | 'development' | 'mixed', required — Indicates for what environment this cloud is responsible.
  - `excluded_namespaces` string[] — List of Kubernetes namespaces to exclude from monitoring (optional). Mutually exclusive with included_namespaces.
  - `included_namespaces` string[] — List of Kubernetes namespaces to include for monitoring (optional). Mutually exclusive with excluded_namespaces.
  - `enable_image_scanning` boolean — Whether to enable container image scanning for this cluster (optional, defaults to false)

## Response `200`

The Kubernetes cloud environment has been successfully created

- object
  - `id` integer — The ID of the newly created cloud environment in Aikido.
  - `endpoint` string — The endpoint where the agent should send the data.
  - `agent_token` string — The token needed to install the Kubernetes agent.
  - `created_at` integer — Unix timestamp when the cluster was created.

## Other responses

- `400` — Could not create Kubernetes cloud

---

[API](https://skmtc.net/aikido/apis/authorization.md) · [All operations](https://skmtc.net/aikido/apis/authorization/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aikido/authorization/revisions/5445e7c21137/schema)
