v1

latestOpenAPI 3.1.02026-07-261690320.7 KB

Create Kubernetes cloud

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

post/clouds/kubernetes

Request body

namestring required

A name for this Kubernetes cluster.

environment'production' | 'staging' | 'development' | 'mixed' required

Indicates for what environment this cloud is responsible.

excluded_namespacesstring[]

List of Kubernetes namespaces to exclude from monitoring (optional). Mutually exclusive with included_namespaces.

included_namespacesstring[]

List of Kubernetes namespaces to include for monitoring (optional). Mutually exclusive with excluded_namespaces.

enable_image_scanningboolean

Whether to enable container image scanning for this cluster (optional, defaults to false)

Example request

{
  "name": "my-kubernetes-cluster",
  "environment": "production",
  "excluded_namespaces": [
    "kube-system",
    "kube-public"
  ],
  "enable_image_scanning": true
}

Response

The Kubernetes cloud environment has been successfully created

idinteger

The ID of the newly created cloud environment in Aikido.

endpointstring

The endpoint where the agent should send the data.

agent_tokenstring

The token needed to install the Kubernetes agent.

created_atinteger

Unix timestamp when the cluster was created.

Example response

{
  "id": 1,
  "endpoint": "https://k8s.aikido-security.com",
  "agent_token": "eyJhbGciOiJIUz...",
  "created_at": 1699372800
}