# cldkctl config

The config command retrieves the Kubernetes configuration file (kubeconfig) used for authentication and cluster access within your Cloudeka project. By default, the configuration file is printed directly to the console, allowing you to view or copy it manually.

## Usage

```
cldkctl config [flags]
```

## Steps

Follow the steps below to run and view the result of this command:

1. Identify your Project ID from the project list (if required for your environment).
2. Run the config command to retrieve the Kubernetes configuration file:

```
./cldkctl config
```

3. Use the --project flag to specify a project ID:

```
./cldkctl config --project
```

4. To save the kubeconfig file to a specific path, use the --output flag:

```
./cldkctl config --output ~/Downloads/kubeconfig.yaml
```

5. The command will either print the kubeconfig content in your terminal or save it to the provided file path.

## Flags

{% hint style="info" %}
This command supports [global flags.](/cloudeka-api-list/global-flags.md) Refer to the Global Flags section for details
{% endhint %}

| Flag                   | Description                                                                            |
| ---------------------- | -------------------------------------------------------------------------------------- |
| `-h, --help`           | Help for the config command.                                                           |
| `-o, --output string`  | Specify a file path to save the kubeconfig file instead of printing it to the console. |
| `-p, --project string` | Specify the project ID to retrieve the kubeconfig file for.                            |

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudeka.ai/cloudeka-api-list/command-reference/cldkctl-config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
