---
title: Cluster Configuration
url: https://docs.vultr.com/products/compute/kubernetes/management/connection
description: Learn how to obtain your Vultr Kubernetes Engine (VKE) cluster configuration for kubectl access and management
publish_date: 2024-09-23T20:20:43.509724Z
last_updated: 2026-05-26T18:59:35.862362Z
---

# How to Retrieve the Cluster Configuration for Vultr Kubernetes Engine Cluster

Retrieving a Vultr Kubernetes Engine (VKE) cluster configuration allows you to access essential details about your Kubernetes cluster, including API endpoints, authentication credentials, and resource specifications. This process is crucial for managing and interacting with your VKE cluster effectively. Vultr Kubernetes Engine provides straightforward methods to retrieve these configurations, ensuring you have the necessary information to operate and scale your VKE cluster efficiently.

Follow this guide to retrieve the Vultr Kubernetes Engine cluster configuration from your Vultr account using the Vultr Console, API, CLI, or Terraform.

=== "Vultr Console"

    1. Navigate to **Products** and click **Kubernetes**.
    2. Click your target VKE cluster to open its management page.
    3. In the top-right corner, click **Download Configuration**.

=== "Vultr API"

    1. Send a `GET` request to the [**List all Kubernetes Clusters** endpoint](https://www.vultr.com/api/#tag/kubernetes/operation/list-kubernetes-clusters) and note the target VKE cluster's ID.

        ```console
        $ curl "https://api.vultr.com/v2/kubernetes/clusters" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `GET` request to the [**Get Kubernetes Cluster Kubeconfig** endpoint](https://www.vultr.com/api/#tag/kubernetes/operation/get-kubernetes-clusters-config) to retrieve the config file for the target VKE cluster.

        ```console
        $ curl "https://api.vultr.com/v2/kubernetes/clusters/{cluster-id}/config" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}" \
            -o kubeconfig.yaml
        ```

=== "Vultr CLI"

    1. List the available VKE clusters in your Vultr account and note the target VKE cluster's ID.

        ```console
        $ vultr-cli kubernetes list --summarize
        ```

    1. Retrieve the VKE cluster configuration file.

        ```console
        $ vultr-cli kubernetes config <cluster-id> --output-file "<your-path>"
        ```

=== "Terraform"

    1. Use the `vultr_kubernetes` data source to read an existing cluster and output its kubeconfig.

        ```terraform
        data "vultr_kubernetes" "cluster" {
            # identify the cluster by id or label
            cluster_id = var.cluster_id
        }

        output "kubeconfig" {
            value = data.vultr_kubernetes.cluster.kubeconfig
        }
        ```

    1. Run `terraform apply` to fetch the kubeconfig.
    
        Example output:

        ```yaml
        Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

        Outputs:

        kubeconfig = <<EOT
        apiVersion: v1
        clusters:
        - cluster:
            certificate-authority-data: REDACTED
            server: https://vke-abc123.us-east-1.vultr-k8s.com:6443
        name: vke-abc123
        contexts:
        - context:
            cluster: vke-abc123
            user: vke-abc123-user
        name: vke-abc123
        current-context: vke-abc123
        kind: Config
        preferences: {}
        users:
        - name: vke-abc123-user
        user:
            token: REDACTED
        EOT
        ```
