# Introduction to kubeconfig

Kubecofig enables clients like `kubectl` and many programming languages to securely access your Kubernetes Cluster. Specifically, kubeconfig is a YAML file that contains either a username and password combination or a secure token that when read programmatically removes the need for the Kubernetes client to ask for interactive authentication. kubeconfig is the secure and standard method to enable access to your Kubernetes clusters.

For more information on kubeconfig, refere to the [Kubernetes kubeconfig documentation.](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)

## Kubernetes Clients

Kubernetes client libraries handle the complicated task of integrating and understanding Kubernetes by natively handling the Kubernetes APIs. A number of client libraries are maintained by the Kubernetes SIG API machinery, this includes Python, Go, Java, dotNet, Javascript and Haskell. These languages and related libraries are able to utilize the kubeconfig file to authenticate against the Kubernetes API.

## kubectl

`kubectl` provides a command line tool for interacting with Kubernetes.

`kubectl` depends on kubeconfig for authentication with your cluster. By default `kubectl` will expect kubeconfig, represented as a file named `config` to be present in the `$HOME/.kube` directory. Without kubeconfig you cannot use `kubectl`.

To get started with `kubectl` view the [cheatsheet](https://platform9.com/learn/tutorials/kubectl). For a detailed guide on `kubectl` review the [Kubernetes documentation.](https://kubernetes.io/docs/reference/kubectl/overview/)


---

# 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.platform9.com/managed-kubernetes/5.15/clusters/kubeconfig/kubeconfig-and-clients-introduction-to-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.
