Configure Cloud Code for VS Code settings

You can customize Cloud Code to enable cluster resource completion, enable YAML formatting and validation, display or hide explorers, collect telemetry, and customize your Kubeconfig path.

Specifying preferences using VS Code Settings

To configure VS Code Settings, click settings Manage> Settingsand then search for cloudcode .

Configuring preferences this way lets you change the defaults that Cloud Code saved when you were first prompted for preferences. These settings include preferences for YAML formatting and completion, telemetry collection, the KubeConfig file path, wrapping style, and criteria for YAML file matching. Other Cloud Code settings are configurable using your settings.json file.

Working with additional KubeConfig files

A KubeConfig file is a file that Kubernetes uses to configure access to clusters. By default, Cloud Code uses the default KubeConfig file (located in the $HOME/.kube directory) for retrieving Kubernetes resources and running commands.

Importing a new KubeConfig

To import an alternative KubeConfig file into Cloud Code, follow these steps:

  1. Click Cloud Codeand then expand the Kubernetessection.
  2. Hold the pointer over the default config name.
  3. Click sync_alt Switch KubeConfignext to the Default Config and then click + Load KubeConfig.
  4. In the file explorer, select the KubeConfig that you want to import. The file you imported becomes the active KubeConfig file.

Tip:If you've imported multiple KubeConfig files, you can easily switch between them by clicking sync_alt Switch KubeConfigand then selecting another KubeConfig file.

Removing a KubeConfig

To remove the KubeConfig file(s) that you've imported, open the command palette (press Ctrl / Cmd + Shift + P or click View> Command Palette), run the Remove KubeConfig from Kubernetes Explorercommand, and then select the configs that you want to remove.

Configuring settings in settings.json

Some advanced settings, like Cloud Code debugger customizations, are configured in the settings.json file.

  1. In Settings, click Edit in settings.jsonunder the setting that you want to change. The settings.json file opens at the appropriate setting.
  2. Type a quotation mark (") to open the list of properties or values for the setting. For example, typing " in cloudcode.debug-kubernetes gives the options of SuppressGoWarning , SuppressJavaWarning , SuppressNETCoreWarning , SuppressNodeJSWarning , and SuppressPythonWarning .
  3. Click the property and then click the value you want the property to have, or, if the setting takes a value directly, click the value. For example, clicking SuppressNodeJSWarning gives the options of true and false .

Get Support

To send feedback, report issues on GitHub , or ask a question on Stack Overflow .
Design a Mobile Site
View Site in Mobile | Classic
Share by: