How-To: Manage resource groups

Learn how to manage resource groups in Radius

This guide will walk you through the process of managing resource groups in Radius. For more information on resource groups, see Resource groups.

Pre-requisites

Step 1: Ensure Radius is installed

Begin by making sure that Radius is installed on your Kubernetes cluster:

rad install kubernetes

Step 2: Create a resource group

Run rad group create to create a resource group:

rad group create myGroup

You should see:

creating resource group "myGroup" in namespace "default"...

resource group "myGroup" created

Step 3: View your resource group

Run rad group show to view the your resource group:

rad group show myGroup

You should see:

ID                                            NAME
/planes/radius/local/resourcegroups/myGroup   myGroup

You can use the -o json flag to view more information about the resource group:

rad group show -o json

You should see:

{
    "id": "/planes/radius/local/resourcegroups/myGroup",
    "location": "global",
    "name": "myGroup",
    "tags": {},
    "type": "System.Resources/resourceGroups",
}

Step 4: Set your resource group as the default

Setting a default resource group allows you to run commands like rad deploy without specifying the -g/--group flag explicitly every time. Run rad group switch to set your new resource group as the default:

rad group switch myGroup

You can now run rad deploy or rad recipe list without needing to specify the group.

Step 5: Delete your resource group

Run rad group delete to delete a resource group:

rad group delete myGroup