# How to use kubeconfig on Linux

After you have successfully downloaded Kube Config on the Deka GPU Service Portal. The following is a guide to using Kube Config on the Linux operating system.

## Configure kubectl

Download the latest version of kubectl in use and run the following command line in your terminal.

{% tabs %}
{% tab title="x86-64" %}

```bash
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
```

{% endtab %}

{% tab title="ARM64" %}

```bash
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
To download a specific version, replace `$(curl -L -s https://dl.k8s.io/release/stable.txt)` with the specific version to download. Here's an example of the syntax executed for a specific download. The following downloads version 1.31.0:

x86-64 type

```bash
curl -LO https://dl.k8s.io/release/v1.31.0/bin/linux/amd64/kubectl
```

ARM64 type

```bash
curl -LO https://dl.k8s.io/release/v1.31.0/bin/linux/arm64/kubectl
```

{% endhint %}

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf0uF7ohiPb2mNGaZ1jJ5sQV2sNNk_Yaek_A4OZDkI3QQ_-sIpN3CdCRiegd8Hi71GqwnxKUUezwkHAHEmcvmlqn3LIv5i_D1pC6jOfi5dV4RvZr5VwUD6QA0gnWleAhxk0riAYuA?key=VdqgWGDwyvFHeaI7pMzFzQ" alt=""><figcaption><p>Success Download kubectl</p></figcaption></figure>

validasi berkas binary dengan menjalankan sintak berikut.

```bash
curl -LO "https://dl.k8s.io/release/v1.28.15/bin/linux/amd64/kubectl.sha256"
echo "$(cat kubectl.sha256)  kubectl" | sha256sum --check
```

If validation of the binary file is successful, it displays kubectl status: OK. Install kubectl by running the syntax below.

```bash
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
```

To ensure the version used is the latest version, run the following syntax.

```
kubectl version --client
```

## Set-up kubeconfig

Create a new directory named .kube in the home directory by executing the following syntax.

```
mkdir ~/.kube
```

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe__VNN357GakdB8IjV96lYyyuRYMeObfIhYfXWrSmJem6_p8AT0zXnVXx92MKDbc2LGCqvFTsCDE6eXwiQSkO42JQ_z5wuJqakBky0upIacllHkfR_vwR9HMWYdNqpQniRZAGQ?key=VdqgWGDwyvFHeaI7pMzFzQ" alt=""><figcaption><p>Create Directory kube</p></figcaption></figure>

After creating a new directory, create a new file in the kube directory with the name config which will store the kubernetes configuration file that you previously downloaded via the Deka GPU Portal Service.

```
nano ~/.kube/config
```

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeVMiSm1chwimrPpl40uSlH9t0RHX2F_YWNHQkiKe2cSSD_fcjRRCpyC_OVoWsdtbaunRSLh_tLFCBh3EYGrgeDf9XH_wH1KeZQT4v-KvK-CFlKfbNpTZRpu-_eCzGQ2s4OE0oSyQ?key=VdqgWGDwyvFHeaI7pMzFzQ" alt=""><figcaption><p>Create Config File</p></figcaption></figure>

Open the kube-config.yaml file previously downloaded via the Deka GPU Portal Service using the text editor you have on your computer. If you haven't downloaded the kube-config file, you can follow the Download kubeconfig subsection. Copy the contents of the kube-config.yaml file to the config file as shown below.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfBPMssmKyUQ4tPL7veNp2E_01RK4TuMxEnx1LjSKganG-gsX4PMgej7NsgNdGXIqNWL8BXoWgl-aeDazY-BLbmnXwPxVV-RjJvKW4YLAEFNnnm7kkq2LuwlnljtUIhYWULaKvlrw?key=VdqgWGDwyvFHeaI7pMzFzQ" alt=""><figcaption><p>Add Config</p></figcaption></figure>

To save the vm.yaml file by pressing CTRL+O, then press Enter, and exit with CTRL+X. Check that the pods in the cluster have been successfully accessed by running the following syntax.

```bash
kubectl get pod
```

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXecry96lt2exK5K71_bByur8IcDGWuIl8qXpAxqvuL649wExCjCZheYLZzFI4fXg7agupbbC5f_EqL4BrPpbLiV_dmntDA6mzvcAyHuEwOX2-luSjJVAjRAktTP3O-Tcq0coRA3WQ?key=VdqgWGDwyvFHeaI7pMzFzQ" alt=""><figcaption><p>Get Pod</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/guidance-for-individual/reference/how-to-use-kubeconfig-on-linux.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.
