DEV Community

Agik Setiawan
Agik Setiawan

Posted on

Update config location in kubectl Kubernetes in Linux

Create file in ~/.bashrc.d/kubectl.config

export KUBECONFIG=YOUR_CUSTOM_LOCATION_CONFIG_PATH:${KUBECONFIG:-$HOME/.kube/config}
Enter fullscreen mode Exit fullscreen mode

after create file like above, open terminal and input command

source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

for check config is works you can use command

kubectl get pod
Enter fullscreen mode Exit fullscreen mode

Top comments (0)