You can connect the CLI to multiple DC/OS clusters at the same time by using the
DCOS_CONFIG environment variable. With this variable you can specify a terminal-specific CLI configurations.
This variable only affects the terminal you are currently connected to. After you end the terminal session, the configuration is removed and your default configuration remains.
Recommendation: Make a back up of your default CLI configuration file (
dcos.toml) before connecting to multiple clusters. By default, this file is located in
/<home-directory>/.dcos/dcos.toml. You can use this file as a template for additional configurations.
Create a cluster configuration file and save to a unique location (e.g.,
/dcos-config/dcos-alice.toml). The file type must be
Tip: You can use the default configuration file (
dcos.toml) as a template.
Open a terminal and run this command to connect a cluster, with the path to your cluster configuration specified (
For example, to connect to a cluster config located in
/<home-directory>/dcos-config/dcos-alice.tomlrun this command:
To disconnect from a cluster, close the terminal session or run this command: