Configure Cloud Code settings in Cloud Code for Cloud Shell
Stay organized with collections
Save and categorize content based on your preferences.
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 Settings
To configure settings, click File > Settings > Open Preferences
and 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:
Click Cloud Code and then expand the Kubernetes
section.
Hold the pointer over the default config name.
Click
sync_altSwitch KubeConfig next to the Default Config and then click
+ Load KubeConfig.
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_altSwitch KubeConfig and 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 Explorer command, 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.
In Settings, click Edit in settings.json under the setting that you want
to change. The settings.json file opens at the appropriate setting.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eCloud Code preferences, including YAML formatting, telemetry collection, and KubeConfig path, can be configured via \u003cstrong\u003eFile\u003c/strong\u003e > \u003cstrong\u003eSettings\u003c/strong\u003e > \u003cstrong\u003eOpen Preferences\u003c/strong\u003e by searching for \u003ccode\u003ecloudcode\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can work with multiple KubeConfig files by importing them through the Cloud Code Kubernetes section, allowing you to switch between different configurations.\u003c/p\u003e\n"],["\u003cp\u003eKubeConfig files can be removed by using the \u003cstrong\u003eRemove KubeConfig from Kubernetes Explorer\u003c/strong\u003e command in the command palette.\u003c/p\u003e\n"],["\u003cp\u003eAdvanced Cloud Code settings, such as debugger customizations, are managed directly within the \u003ccode\u003esettings.json\u003c/code\u003e file, accessed through the settings interface.\u003c/p\u003e\n"],["\u003cp\u003eThe default KubeConfig file used by Cloud Code is located in the \u003ccode\u003e$HOME/.kube\u003c/code\u003e directory.\u003c/p\u003e\n"]]],[],null,["# Configure Cloud Code settings in Cloud Code for Cloud Shell\n\nYou can customize Cloud Code to enable cluster resource\ncompletion, enable YAML formatting and validation, display or hide explorers,\ncollect telemetry, and customize your Kubeconfig path.\n\nSpecifying preferences using Settings\n-------------------------------------\n\nTo configure settings, click **File** \\\u003e **Settings** \\\u003e **Open Preferences**\nand then search for `cloudcode`.\n\nConfiguring preferences this way lets you change the defaults that\nCloud Code saved when you were first prompted for preferences.\nThese settings include preferences for YAML formatting and completion,\ntelemetry collection, the KubeConfig file path, wrapping style, and criteria for\nYAML file matching. Other Cloud Code settings are configurable\nusing your `settings.json` file.\n\nWorking with additional KubeConfig files\n----------------------------------------\n\nA [KubeConfig file](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)\nis a file that Kubernetes uses to configure access to clusters. By default,\nCloud Code uses the default KubeConfig file (located in the\n`$HOME/.kube` directory) for retrieving Kubernetes resources and running\ncommands.\n\n### Importing a new KubeConfig\n\nTo import an alternative KubeConfig file into Cloud Code,\nfollow these steps:\n\n1. Click **Cloud Code** and then expand the **Kubernetes** section.\n2. Hold the pointer over the default config name.\n3. Click sync_alt **Switch KubeConfig** next to the Default Config and then click **+ Load KubeConfig**.\n4. In the file explorer, select the KubeConfig that you want to import. The file you imported becomes the active KubeConfig file.\n\n**Tip:** If you've imported multiple KubeConfig files, you can easily switch\nbetween them by clicking\nsync_alt\n**Switch KubeConfig** and then selecting another KubeConfig file.\n\n### Removing a KubeConfig\n\nTo remove the KubeConfig file(s) that you've imported, open the command palette\n(press `Ctrl`/`Cmd`+`Shift`+`P` or click **View** \\\u003e **Command Palette** ), run\nthe **Remove KubeConfig from Kubernetes Explorer** command, and then select the\nconfigs that you want to remove.\n\nConfiguring settings in `settings.json`\n---------------------------------------\n\nSome advanced settings, like Cloud Code debugger customizations,\nare configured in the `settings.json` file.\n\n1. In Settings, click **Edit in settings.json** under the setting that you want to change. The `settings.json` file opens at the appropriate setting.\n2. 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`.\n3. 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`."]]