K8s for Data Engineers — Kubeconfig

Amit Singh Rathore
Dev Genius
Published in
3 min readMay 9, 2024

--

A configuration file that stores config of k8s cluster(s)

We can connect to a K8s cluster without a kubeconfig, but we will have to pass certain information explicitly in command.

KUBECONFIG= kubectl get nodes \
--server https://dev.asrathore.com:6443 \
--user dev-user \
--client-certificate /path/to/dev/ca.crt \
--client-key /path/to/dev/dev-user.key \
--insecure-skip-tls-verify

This will become cumbersome to run all commands with these many extra arguments. This is where the kubeconfig file comes handy.

--

--