> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting global config variables

Data Science & AI Workbench provides a secondary config map (`anaconda-enterprise-env-var-config`) that you can use to configure the platform. Any environment variables added to this config map will be available to all sessions, deployments, and scheduled jobs. This is a convenient alternative to using the Workbench CLI, as you can add any variable [supported by conda configuration](https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#general-configuration).

To make global configuration changes to the platform:

1. Create a backup of your current configmap file, then edit your configurations by running the following commands:

> [tab] BYOK8s
>
> Run the following commands from anywhere you have `kubectl` access to the cluster:
>
> ```sh theme={null}
> # Replace <NAMESPACE> with your Workbench cluster namespace
> kubectl get cm -n <NAMESPACE> anaconda-enterprise-env-var-config -o=jsonpath={.data."container-env-vars\.yml"} > ntainer-env-vars.yaml
> kubectl edit cm -n <NAMESPACE> anaconda-enterprise-env-var-config
> ```

> [tab] Gravity
>
> Run the following commands in an interactive shell *on the master node*:
>
> ```sh theme={null}
> # Replace <NAMESPACE> with your Workbench cluster namespace
> sudo gravity enter
> kubectl get cm anaconda-enterprise-env-var-config -o yaml > anaconda-env-var-config.yaml
> kubectl edit cm -n <NAMESPACE> anaconda-enterprise-env-var-config
> ```

1. Make your changes to the file, then save it.
2. Restart all pods using the following command:

   ```sh theme={null}
   # Replace <NAMESPACE> with your Workbench cluster namespace
   kubectl delete -n <NAMESPACE> --wait=false $(kubectl get pods -o name|grep ap-)
   ```

> [!TIP]
>
> If something goes wrong with your configuration updates, you can restore your previous configurations by re-running the following commands:
>
> ```sh theme={null}
> # Replace <NAMESPACE> with your Workbench cluster namespace
> kubectl delete cm -n <NAMESPACE> anaconda-enterprise-env-var-config
> kubectl create cm -n <NAMESPACE> anaconda-enterprise-env-var-config --from-file anaconda-env-var-config.yml
> ```
