> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akua.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Import a cluster

> Connect your existing Kubernetes infrastructure

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/akua-1dce587a/XutebFe61mz4P6aZ/images/heros/cluster-import-light.svg?fit=max&auto=format&n=XutebFe61mz4P6aZ&q=85&s=a6899cfdd35bf98b4d7fbb5a650b6324" alt="An existing customer-operated Kubernetes cluster with its control plane, nodes, and workloads sits on one side of a trust boundary; a kubeconfig stamped with scoped access crosses the boundary so an Akua workspace shows the cluster imported, with its nodes and workloads inventoried and a namespaces, deployments, and RBAC access scope" width="1536" height="864" data-path="images/heros/cluster-import-light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/akua-1dce587a/XutebFe61mz4P6aZ/images/heros/cluster-import-dark.svg?fit=max&auto=format&n=XutebFe61mz4P6aZ&q=85&s=82965d805839612917e93a84f79fe3e8" alt="An existing customer-operated Kubernetes cluster with its control plane, nodes, and workloads sits on one side of a trust boundary; a kubeconfig stamped with scoped access crosses the boundary so an Akua workspace shows the cluster imported, with its nodes and workloads inventoried and a namespaces, deployments, and RBAC access scope" width="1536" height="864" data-path="images/heros/cluster-import-dark.svg" />
</Frame>

If you already have a Kubernetes cluster from any source, you can import it into Akua. This works with any existing cluster — whether it's self-managed, from cloud providers (EKS, GKE, AKS), or other managed Kubernetes services. This lets you leverage your existing investment while gaining access to Akua's product install and marketplace features.

Consider [creating a managed cluster](/clusters/create) instead if you don't already have a Kubernetes cluster set up. Akua handles all the complex control plane management, so you can focus on your product rather than infrastructure operations. With imported clusters, control plane and worker operations are managed by your cloud provider or yourself, depending on your cluster type.

## When to import versus create

<Tabs>
  <Tab title="Import your cluster">
    Choose to import your cluster if you already have Kubernetes infrastructure from EKS, GKE, AKS, or other providers, have invested in cluster setup, need specific configurations like custom networking or <Tooltip headline="Compliance Requirements" tip="Akua makes security simple because you have full control of your worker machines running on your terms, in environments your customers need.">compliance requirements</Tooltip>, or want to maintain your existing cluster management approach.
  </Tab>

  <Tab title="Create a managed cluster">
    Consider creating a new managed cluster if you want Akua to handle the control plane with zero operational overhead, are new to Kubernetes and want to avoid complexity, prefer simplicity to focus on products rather than infrastructure, or need quick setup to get running in minutes.
  </Tab>
</Tabs>

## Prerequisites

Before importing your cluster, ensure it meets these requirements:

* **Kubernetes version**: 1.33+ (check with `kubectl version`)
* **Cluster access**: Admin permissions, network connectivity, valid <Tooltip headline="Kubeconfig" tip="A kubeconfig file contains cluster connection information, authentication credentials, and context settings needed to access a Kubernetes cluster.">kubeconfig</Tooltip>
* **Required permissions**: <Tooltip headline="Namespace" tip="A namespace is a Kubernetes mechanism for organizing and isolating resources within a cluster. Each product install gets its own namespace for security and isolation between different customer installs.">Namespace</Tooltip> management, workload deployment, <Tooltip headline="RBAC" tip="RBAC (Role-Based Access Control) is a Kubernetes authorization mechanism that controls access to cluster resources based on user roles and permissions.">RBAC</Tooltip> operations

<AccordionGroup>
  <Accordion title="View detailed RBAC permissions">
    If you're not using admin kubeconfig, create a service account with these permissions and bind it to a ClusterRole:

    ```yaml RBAC configuration theme={null}
    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: akua-sa
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: akua-role
    rules:
      - apiGroups: ['']
        resources: ['pods', 'pods/log', 'pods/exec', 'secrets']
        verbs: ['get', 'list', 'watch', 'create', 'update', 'delete']
      - apiGroups: ['apps']
        resources: ['statefulsets', 'statefulsets/status']
        verbs: ['get', 'list', 'watch', 'create', 'update', 'delete']
      - apiGroups: ['']
        resources: ['namespaces', 'namespaces/finalize']
        verbs: ['get', 'list', 'watch', 'create', 'update', 'delete']
    ---
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: akua-role-binding
    subjects:
      - kind: ServiceAccount
        name: akua-sa
    roleRef:
      kind: ClusterRole
      name: akua-role
      apiGroup: rbac.authorization.k8s.io
    ```
  </Accordion>
</AccordionGroup>

## How to import your cluster

<Steps>
  <Step title="Prepare your kubeconfig">
    Ensure you have a valid kubeconfig file with admin access to your cluster.

    ```bash Test cluster connection theme={null}
    kubectl cluster-info
    kubectl get nodes
    ```

    ```bash Export kubeconfig theme={null}
    # If using default location
    cat ~/.kube/config

    # Or specify custom path
    cat /path/to/your/kubeconfig
    ```
  </Step>

  <Step title="Navigate to the clusters dashboard">
    In the [clusters dashboard](https://akua.dev/clusters), click **"Import Cluster"** and choose **"Import Existing Cluster"**.
  </Step>

  <Step title="Upload and validate kubeconfig">
    <Tabs>
      <Tab title="File upload">
        Click "Upload kubeconfig file" and select your kubeconfig file.
      </Tab>

      <Tab title="Paste content">
        Copy your kubeconfig content and paste it into the text area.
      </Tab>
    </Tabs>

    Akua will automatically verify cluster accessibility, required permissions, Kubernetes version compatibility, and network connectivity.

    <Warning>
      If validation fails, check your kubeconfig and cluster permissions before retrying.
    </Warning>
  </Step>

  <Step title="Configure and complete import">
    Set up how Akua will interact with your cluster: choose a cluster name, set the default namespace where new products will deploy, configure optional resource limits, and enable Akua observability (recommended). Then click **"Import Cluster"** to finalize the process.

    <Success>
      Your cluster will appear in the dashboard as "Active" and ready for product installs.
    </Success>
  </Step>
</Steps>

## Limitations of imported clusters

Be aware of these differences compared to managed clusters:

<AccordionGroup>
  <Accordion title="Control plane management">
    Control plane and worker operations are managed by your cloud provider or yourself, depending on your cluster type. Akua does not manage the control plane for imported clusters.
  </Accordion>

  <Accordion title="Worker node provisioning">
    You manage worker nodes yourself or through your cloud provider. Akua handles product installs but not worker infrastructure management.
  </Accordion>

  <Accordion title="Automatic updates">
    You must handle Kubernetes version updates and cluster maintenance yourself. Akua does not automatically update imported clusters.
  </Accordion>

  <Accordion title="Monitoring">
    Limited monitoring compared to managed clusters. Akua provides application-layer monitoring, but infrastructure monitoring is your responsibility.
  </Accordion>

  <Accordion title="Auto-scaling">
    Not supported through Akua. You must configure and manage auto-scaling through your cloud provider or cluster management tools.
  </Accordion>

  <Accordion title="Support level">
    Application layer support only. Akua helps with product installs and troubleshooting, but full infrastructure support is not included.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Kubeconfig validation fails">
    * Verify cluster is accessible from the internet
    * Check that kubeconfig has admin permissions
    * Ensure Kubernetes version is 1.33 or newer
    * Test connection locally:

    ```bash Test connection theme={null}
    kubectl cluster-info
    ```

    ```text Expected output theme={null}
    Kubernetes control plane is running at https://xxx.xxx.xxx.xxx:6443
    CoreDNS is running at https://xxx.xxx.xxx.xxx:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

    To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
    ```
  </Accordion>

  <Accordion title="Network connectivity issues">
    * Verify cluster API server is publicly accessible
    * Check firewall rules allow Akua IP ranges
    * Ensure DNS resolution works for your cluster
    * Test from external network:

    ```bash Test API server access theme={null}
    curl -k https://your-cluster-api:6443
    ```
  </Accordion>

  <Accordion title="Permission errors during import">
    * Confirm kubeconfig has cluster-admin role
    * Check RBAC is properly configured
    * Verify service account has necessary permissions
    * Test permissions:

    ```bash Test permissions theme={null}
    kubectl auth can-i "*" "*" --all-namespaces
    ```
  </Accordion>

  <Accordion title="Products failing to deploy">
    * Check cluster has adequate resources
    * Verify default namespace exists and is accessible
    * Review cluster events:

    ```bash Review events theme={null}
    kubectl get events --sort-by=.metadata.creationTimestamp
    ```

    * Contact support with deployment logs
  </Accordion>
</AccordionGroup>

## API

Manage clusters programmatically.

<CardGroup cols={2}>
  <Card title="Clusters API reference" icon="book" href="/api-reference/clusters/list-clusters">
    Endpoints, parameters, response shapes, and try-it playground.
  </Card>

  <Card title="Authentication" icon="key" href="/apis/authentication">
    Mint API tokens for programmatic access.
  </Card>
</CardGroup>

## Related topics

<CardGroup cols={2}>
  <Card title="Create a managed cluster" icon="plus" href="/clusters/create">
    Set up a cluster where Akua manages the control plane.
  </Card>

  <Card title="Clusters overview" icon="circle-info" href="/clusters">
    Understand how clusters work in Akua.
  </Card>

  <Card title="Storage" icon="database" href="/clusters/storage">
    Add persistent storage to your cluster.
  </Card>

  <Card title="Regions" icon="globe" href="/clusters/regions">
    Organize imported clusters with the rest of your infrastructure.
  </Card>
</CardGroup>
