How-To: Use Radius workspaces
Categories:
Pre-requisites
How-to: Use workspaces to switch between environments
When you have multiple environments initialized for different purposes workspaces enable you to switch between different environments easily. You can create separate workspaces and switch between them as you are working through your deployment lifecycle.
-
Install the Radius control plane on kubernetes cluster
rad install kubernetes
-
Create a resource group named
mygroup
usingrad group create
:rad group create mygroup
-
Create an environment named
myenvironment
usingrad env create
:rad env create myenvironment
-
Create a workspace named
myworkspace
usingrad workspace create
:rad workspace create kubernetes myworkspace --group mygroup --environment myenvironment
Radius writes the workspace details to your local configuration file (
~/.rad/config.yaml
on Linux and macOS,%USERPROFILE%\.rad\config.yaml
on Windows). -
Create another resource group named
yourgroup
usingrad group create
:rad group create yourgroup
-
Create an environment named
yourenvironment
usingrad env create
:rad env create yourenvironment
-
Create a workspace named
yourworkspace
usingrad workspace create
:rad workspace create kubernetes yourworkspace --group yourgroup --environment yourenvironment
-
Verify your
config.yaml
file. It should show bothmyworkspace
andyourworkspace
workspaces, with your environments:workspaces: default: yourworkspace items: yourworkspace: connection: context: mycluster kind: kubernetes environment: /planes/radius/local/resourcegroups/yourgroup /providers/applications.core/environments/yourenvironment scope: /planes/radius/local/resourceGroups/yourgroup myworkspace: connection: context: mycluster kind: kubernetes environment: /planes/radius/local/resourcegroups/mygroup /providers/applications.core/environments/myenvironment scope: /planes/radius/local/resourceGroups/mygroup
-
You can now deploy applications to both myworkspace and yourworkspace using
rad deploy
, specifying the-w
flag.
Feedback
Was this page helpful?
Glad to hear it! Please feel free to star our repo and join our Discord server to stay up to date with the project.
Sorry to hear that. If you would like to also contribute a suggestion visit and tell us how we can improve.