Most Cloud Code settings, such as enabling cluster resource completion, opting for YAML formatting and validation, and customizing your Kubeconfig path, can be configured using the Settings menu.
Specifying preferences using Settings
Settings is accessible through File > Settings > Open Preferences. Configuring preferences this way comes in handy when you'd like to override the defaults Cloud Code saved when you were first prompted for preferences.
You can use the settings to toggle your preferences around YAML formatting and completion, explorer visibility, telemetry collection, and other Cloud Code options. You can also use it to define an alternate kubeconfig file path, determine a preferred style of prose wrapping, and define criteria for YAML file matching. Other Cloud Code settings are configurable using your settings.json file.
Working with additional kubeconfig files
By default, Cloud Code uses the default kubeconfig file (located under the '$HOME/.kube' directory) for retrieving Kubernetes resources and running commands.
Importing a new kubeconfig
To import an alternate kubeconfig file into Cloud Code, follow these steps:
- Navigate to the Kubernetes Explorer .
- Hover over the default config name.
- Click on 'Switch kubeconfig' using the double arrow button next to the Default Config and select '+ Load kubeconfig…'. This will open up a file explorer.
- Select the kubeconfig that you want to import from the file explorer. This switches the active kubeconfig file that Cloud Code uses to the one you just imported.
Tip: If you've imported multiple kubeconfigs, you can easily switch between them by clicking on the 'Switch kubeconfig' button and selecting the kubeconfig you'd like to switch to.
Removing a kubeconfig
To remove the kubeconfig(s) that you've imported, you can run the 'Remove kubeconfig from Cluster Explorer' command and select as many configs as you'd like to remove.