# KubeConfig

### Overview

ClawCloud Run adheres to Kubernetes conventions to simplify adoption for developers familiar with open-source Kubernetes ecosystems. Instead of introducing proprietary cluster management APIs, we enable direct integration with standard `kubectl` tooling. Users migrating from Kubernetes environments will find their existing workflows and toolchains fully compatible with ClawCloud Run.

This guide demonstrates how to:

* Download a `Kubeconfig.yaml` file from the ClawCloud Run console
* Configure `kubectl` for cluster management
* Validate connectivity and implement security best practices

***

### Prerequisites

1. **Cluster Access**\
   Active permissions for your target Kubernetes cluster
2. **kubectl Installation**\
   Install `kubectl` following [official Kubernetes instructions](https://kubernetes.io/docs/tasks/tools/)
3. **Network Connectivity**\
   Ensure outbound access to Kubernetes API Server endpoints

***

### Configuration Workflow

#### Step 1: Download Kubeconfig File

1. **Access Console**\
   Navigate to the ClawCloud Run management portal

<figure><img src="/files/afMoMeaakbwli6jxWegu" alt="" width="172"><figcaption></figcaption></figure>

2. **Export Configuration**\
   Hover over the profile icon in the top-right corner:

* Select **Connection Settings** tab
* Locate **Kubeconfig Download** section
* Click **Download Kubeconfig** and save securely

> ⚠️ **Security Note**: This file contains sensitive credentials - store it in a protected location

***

#### Step 2: Configure Kubeconfig

**Method 1: Single Cluster Setup (New Users)**

```bash
# Create configuration directory
mkdir -p ~/.kube

# Replace default config
cp /path/to/your/Kubeconfig.yaml ~/.kube/config
```

**Method 2: Multi-Cluster Management (Advanced)**

```bash
# Merge configurations
KUBECONFIG=~/.kube/config:/path/to/Kubeconfig.yaml kubectl config view --flatten > ~/.kube/config_temp
mv ~/.kube/config_temp ~/.kube/config
```

***

#### Step 3: Validate Connectivity

Test configuration with:

```bash
kubectl get pods
```

**Expected Output**:

```shell
NAME           READY   STATUS    RESTARTS   AGE
devbox-6zgnz   1/1     Running   0          7d18h
```

***

### Security Recommendations

1. **File Permissions**

   ```bash
   chmod 600 ~/.kube/config
   ```
2. **Credential Rotation**\
   Regenerate Kubeconfig files via console every 90 days
3. **RBAC Best Practices**\
   Create distinct role-based access control (RBAC) policies for individual users


---

# 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.run.claw.cloud/clawcloud-run/guide/advanced/kubeconfig.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.
