- An Azure subscription
- Azure CLI or Cloud Shell on Azure Portal
- Helm
- kubectl
export AZURE_SUBSCRIPTION=<your Azure subscrption id>
export RESOURCE_GROUP=<Azure resource group>
export AZURE_LOCATION=<Azure region, i.e. westus2>
export AKS_CLUSTER=<AKS cluster name>
export RADIUS_WORKSPACE=aks-trading
export RADIUS_GROUP=trading-
Set the subscription you want to use:
az login az account set --subscription $AZURE_SUBSCRIPTION
-
Create a resource group:
az group create --name $RESOURCE_GROUP --location $AZURE_LOCATION
-
Create an AKS cluster:
az aks create \ --resource-group $RESOURCE_GROUP \ --name $AKS_CLUSTER \ --node-count 2 \ --enable-addons monitoring \ --generate-ssh-keys \ --enable-oidc-issuer \ --enable-workload-identity
NOTE: If you want to reuse an existing AKS cluster, make sure OIDC issuer an Workload Idenity are enabled:
az aks update --resource-group <resource group name> --name <aks cluster name> --enable-oidc-issuer --enable-workload-identity -
Get AKS credential and merge to your
kubectlconfig:az aks get-credentials --resource-group $RESOURCE_GROUP --name $AKS_CLUSTER
NOTE: The above command merges AKS cluster config into your local
kubectlconfig. Run it from where you plan to usekubectlcommand.
##. Register Azure credentials
-
You need the AKS OIDC issuer URL (also needed later for the app deploy):
export AKS_OIDC_ISSUER=$(az aks show \ --resource-group $RESOURCE_GROUP \ --name $AKS_CLUSTER \ --query oidcIssuerProfile.issuerUrl \ -o tsv)
-
Register Azure credentials so Radius can provision Azure resources (Event Grid, Managed Identity, etc.):
Use
wi-helper.shscript under thetutorials/getting-started/assets/folder to create managed identity and set up service account federation:NOTE: See https://docs.radapp.io/guides/operations/providers/azure-provider/howto-azure-provider-wi/ for more information
./wi-helper.sh $AKS_CLUSTER $RESOURCE_GROUP $AZURE_SUBSCRIPTION $AKS_OIDC_ISSUER