Working with additional kubeconfig files

By default, the Cloud Code extension 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.

Managing kubeconfigs

To add or remove kubeconfigs, navigate to Cloud Code settings within your IDE (File > Settings > Cloud Code > Kubernetes or for Mac OS X, IntelliJ IDEA > Preferences > Cloud Code > Kubernetes).

Adding a kubeconfig file using the Kubeconfig section under 'Kubernetes' in
Cloud Code settings. Below the list of kubeconfigs are buttons for adding an
additional kubeconfig or removing selected kubeconfigs.

Using the Kubernetes resource browser

You can easily toggle the resource browser's current kubeconfig by clicking on the kubeconfigs drop-down menu and selecting the kubeconfig you want to use. Upon selecting a kubeconfig, the tool window updates to use the chosen kubeconfig.

Tip: New kubeconfigs can be added directly using the kubeconfigs drop-down menu.

Expanding the kubeconfig dropdown menu in the Kubernetes resource browser to
show available kubeconfigs. Provides the options to select an already added
kubeconfig, or add a new kubeconfig.

Using Cloud Code Run Configurations

Cloud Code Run Configurations can be modified to use alternate kubeconfig files. To change kubeconfigs, open the Run Configuration to modify and under Run/Debug settings, select the kubeconfig you want to use from the kubeconfig drop-down menu. Upon selecting a kubeconfig, available contexts update to reflect those found in the selected kubeconfig.

Tip: New kubeconfigs can be added directly from run configurations by clicking on the "+" button to the right of the drop-down.

Editing kubeconfig settings in Run Configurations. Provides a drop-down to
select an already added kubeconfig, and a button to add a new kubeconfig.

Getting Support

To send feedback, report issues on GitHub, or ask a question on Stack Overflow.