<p>I am trying to use VSCode Cloud Studio plugin to deploy and debug a project in Kubernetes. When I use intellij and Cloud Studio plugin there, everything works perfect. My MongoDB is persistent with each deployment. When I use VSCode and Cloud Studio there, MongoDB is not persistent anymore. I would appreciate any tips to make it work in VSCode too.</p>
<p>When I deploy via intellij it uses the same persistent volume claim. When I deploy via VSCode it creates a new persistent volume claim everytime.</p>
<p>Here is the launch.json for VSCode:</p>
<pre><code>    {
    &quot;configurations&quot;: [
        {
            &quot;name&quot;: &quot;Kubernetes: Run/Debug&quot;,
            &quot;type&quot;: &quot;cloudcode.kubernetes&quot;,
            &quot;request&quot;: &quot;launch&quot;,
            &quot;skaffoldConfig&quot;: &quot;${workspaceFolder}\\skaffold.yaml&quot;,
            &quot;watch&quot;: false,
            &quot;cleanUp&quot;: false,
            &quot;portForward&quot;: true,
            &quot;imageRegistry&quot;: &quot;XYZ&quot;,
            &quot;debug&quot;: [
                {
                    &quot;image&quot;: &quot;XYZ&quot;,
                    &quot;containerName&quot;: &quot;XYZ&quot;,
                    &quot;sourceFileMap&quot;: {
                        &quot;${workspaceFolder}&quot;: &quot;/root/&quot;
                    }
                }
            ]
        }
    ]
}
</code></pre>
<p>Here is the workspace.xml from intellij:</p>
<pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;project version=&quot;4&quot;&gt;
  &lt;component name=&quot;ChangeListManager&quot;&gt;
    &lt;list default=&quot;true&quot; id=&quot;b5a077d4-323a-4042-8c4a-3bdd2d997e47&quot; name=&quot;Changes&quot; comment=&quot;&quot; /&gt;
    &lt;option name=&quot;SHOW_DIALOG&quot; value=&quot;false&quot; /&gt;
    &lt;option name=&quot;HIGHLIGHT_CONFLICTS&quot; value=&quot;true&quot; /&gt;
    &lt;option name=&quot;HIGHLIGHT_NON_ACTIVE_CHANGELIST&quot; value=&quot;false&quot; /&gt;
    &lt;option name=&quot;LAST_RESOLUTION&quot; value=&quot;IGNORE&quot; /&gt;
  &lt;/component&gt;
  &lt;component name=&quot;Git.Settings&quot;&gt;
    &lt;option name=&quot;RECENT_GIT_ROOT_PATH&quot; value=&quot;$PROJECT_DIR$&quot; /&gt;
  &lt;/component&gt;
  &lt;component name=&quot;MarkdownSettingsMigration&quot;&gt;
    &lt;option name=&quot;stateVersion&quot; value=&quot;1&quot; /&gt;
  &lt;/component&gt;
  &lt;component name=&quot;ProjectId&quot; id=&quot;2KV2OUqPUEf43q5Aj0UCGkKKm10&quot; /&gt;
  &lt;component name=&quot;ProjectViewState&quot;&gt;
    &lt;option name=&quot;hideEmptyMiddlePackages&quot; value=&quot;true&quot; /&gt;
    &lt;option name=&quot;showLibraryContents&quot; value=&quot;true&quot; /&gt;
  &lt;/component&gt;
  &lt;component name=&quot;PropertiesComponent&quot;&gt;
    &lt;property name=&quot;RunOnceActivity.OpenProjectViewOnStart&quot; value=&quot;true&quot; /&gt;
    &lt;property name=&quot;RunOnceActivity.ShowReadmeOnStart&quot; value=&quot;true&quot; /&gt;
    &lt;property name=&quot;WebServerToolWindowFactoryState&quot; value=&quot;false&quot; /&gt;
    &lt;property name=&quot;com.google.cloudcode.ide_session_index&quot; value=&quot;20230118_0001&quot; /&gt;
    &lt;property name=&quot;last_opened_file_path&quot; value=&quot;$PROJECT_DIR$&quot; /&gt;
    &lt;property name=&quot;nodejs_package_manager_path&quot; value=&quot;npm&quot; /&gt;
    &lt;property name=&quot;settings.editor.selected.configurable&quot; value=&quot;preferences.pluginManager&quot; /&gt;
    &lt;property name=&quot;ts.external.directory.path&quot; value=&quot;C:\Program Files\JetBrains\IntelliJ IDEA 2021.3.2\plugins\JavaScriptLanguage\jsLanguageServicesImpl\external&quot; /&gt;
  &lt;/component&gt;
  &lt;component name=&quot;RunDashboard&quot;&gt;
    &lt;option name=&quot;excludedTypes&quot;&gt;
      &lt;set&gt;
        &lt;option value=&quot;gcp-app-engine-local-run&quot; /&gt;
      &lt;/set&gt;
    &lt;/option&gt;
  &lt;/component&gt;
  &lt;component name=&quot;RunManager&quot;&gt;
    &lt;configuration name=&quot;Develop on Kubernetes&quot; type=&quot;google-container-tools-skaffold-run-config&quot; factoryName=&quot;google-container-tools-skaffold-run-config-dev&quot; show_console_on_std_err=&quot;false&quot; show_console_on_std_out=&quot;false&quot;&gt;
      &lt;option name=&quot;allowRunningInParallel&quot; value=&quot;false&quot; /&gt;
      &lt;option name=&quot;buildEnvironment&quot; value=&quot;Local&quot; /&gt;
      &lt;option name=&quot;cleanupDeployments&quot; value=&quot;false&quot; /&gt;
      &lt;option name=&quot;deployToCurrentContext&quot; value=&quot;true&quot; /&gt;
      &lt;option name=&quot;deployToMinikube&quot; value=&quot;false&quot; /&gt;
      &lt;option name=&quot;envVariables&quot; /&gt;
      &lt;option name=&quot;imageRepositoryOverride&quot; /&gt;
      &lt;option name=&quot;kubernetesContext&quot; /&gt;
      &lt;option name=&quot;mappings&quot;&gt;
        &lt;list /&gt;
      &lt;/option&gt;
      &lt;option name=&quot;moduleDeploymentType&quot; value=&quot;DEPLOY_MODULE_SUBSET&quot; /&gt;
      &lt;option name=&quot;projectPathOnTarget&quot; /&gt;
      &lt;option name=&quot;resourceDeletionTimeoutMins&quot; value=&quot;2&quot; /&gt;
      &lt;option name=&quot;selectedOptions&quot;&gt;
        &lt;list /&gt;
      &lt;/option&gt;
      &lt;option name=&quot;skaffoldConfigurationFilePath&quot; value=&quot;$PROJECT_DIR$/skaffold.yaml&quot; /&gt;
      &lt;option name=&quot;skaffoldModules&quot;&gt;
        &lt;list&gt;
          &lt;option value=&quot;XYZ&quot; /&gt;
        &lt;/list&gt;
      &lt;/option&gt;
      &lt;option name=&quot;skaffoldNamespace&quot; /&gt;
      &lt;option name=&quot;skaffoldProfile&quot; /&gt;
      &lt;option name=&quot;skaffoldWatchMode&quot; value=&quot;ON_DEMAND&quot; /&gt;
      &lt;option name=&quot;statusCheck&quot; value=&quot;true&quot; /&gt;
      &lt;option name=&quot;verbosity&quot; value=&quot;WARN&quot; /&gt;
      &lt;method v=&quot;2&quot; /&gt;
    &lt;/configuration&gt;
  &lt;/component&gt;
  &lt;component name=&quot;SpellCheckerSettings&quot; RuntimeDictionaries=&quot;0&quot; Folders=&quot;0&quot; CustomDictionaries=&quot;0&quot; DefaultDictionary=&quot;application-level&quot; UseSingleDictionary=&quot;true&quot; transferred=&quot;true&quot; /&gt;
  &lt;component name=&quot;TaskManager&quot;&gt;
    &lt;task active=&quot;true&quot; id=&quot;Default&quot; summary=&quot;Default task&quot;&gt;
      &lt;changelist id=&quot;b5a077d4-323a-4042-8c4a-3bdd2d997e47&quot; name=&quot;Changes&quot; comment=&quot;&quot; /&gt;
      &lt;created&gt;1674045398429&lt;/created&gt;
      &lt;option name=&quot;number&quot; value=&quot;Default&quot; /&gt;
      &lt;option name=&quot;presentableId&quot; value=&quot;Default&quot; /&gt;
      &lt;updated&gt;1674045398429&lt;/updated&gt;
      &lt;workItem from=&quot;1674045401219&quot; duration=&quot;2543000&quot; /&gt;
    &lt;/task&gt;
    &lt;servers /&gt;
  &lt;/component&gt;
  &lt;component name=&quot;TypeScriptGeneratedFilesManager&quot;&gt;
    &lt;option name=&quot;version&quot; value=&quot;3&quot; /&gt;
  &lt;/component&gt;
&lt;/project&gt;
</code></pre>
<p>All other files are the same for the project of course.</p>

<p>It looks like the Cloud Code for IntelliJ configuration is restricting the deployment to the XYZ module, but not in the Cloud Code for VS Code configuration.</p>
