kubeconfig files are Kubernetes configuration files that organize cluster access, users, and contexts. This page shows you how to add, delete and switch between different kubeconfigs in Cloud Code.
For more information about kubeconfig files, see the Kubernetes documentation on organizing cluster access using kubeconfig files.
Manage kubeconfigs
By default, the Cloud Code plugin uses the default kubeconfig file (located
under the $HOME/.kube
directory) for retrieving Kubernetes resources and
running commands. However, additional kubeconfig files may be configured.
Add additional kubeconfig files
To add additional kubeconfig files:
- Open the command palette (press
Ctrl
/Cmd
+Shift
+P
or click View > Command Palette), and then run Cloud Code: Switch kubeconfig. - Click + Load kubeconfig, and then navigate to the location of the kubeconfig file you want to add.
- Select the kubeconfig file you want to add, and then click Add KubeConfig Path.
- Provide a name for the new kubeconfig when prompted.
- Press
Enter
to confirm.
Remove kubeconfig files
To remove kubeconfig files:
- Open the command palette (press
Ctrl
/Cmd
+Shift
+P
or click View > Command Palette), and then run Cloud Code: Remove KubeConfig from Kubernetes Explorer. - Select the checkbox next to the kubeconfig you want to remove, and then click Ok.
Switch kubeconfigs
You can switch kubeconfigs using the Command palette. To switch kubeconfigs:
- Open the Command palette, and then run Cloud Code: Switch KubeConfig.
- Click on the kubeconfig you want to use.
What's next
- Organize your cluster access using kubeconfig files.
- Develop and debug parts of a microservice application using skaffold.
- Learn more about Cloud Code's YAML editing assistance.