How-To: Upgrade Radius on Kubernetes

Learn how to upgrade Radius on Kubernetes

Radius does not offer backward compatibility with previous releases. Breaking changes may happen between releases and we recommend doing a fresh installation of the latest version of Radius after every release.

Step 1 : Delete any existing Radius Environments

To delete any existing Radius Environments, run the following command:

rad env delete

Step 2: Uninstall the existing Radius control-plane

To uninstall the existing Radius control-plane, run the following command:

rad uninstall kubernetes

Step 3: Install the rad CLI

The rad CLI manages your applications, resources, and environments. You can install it on your local machine with the following installation scripts:


wget -q "https://raw.githubusercontent.com/radius-project/radius/main/deploy/install.sh" -O - | /bin/bash

To try out an unstable release visit the edge docs.


curl -fsSL "https://raw.githubusercontent.com/radius-project/radius/main/deploy/install.sh" | /bin/bash

To try out an unstable release visit the edge docs.


Run the following in a PowerShell window:

iwr -useb "https://raw.githubusercontent.com/radius-project/radius/main/deploy/install.ps1" | iex

You may need to refresh your $PATH environment variable to access rad:

$Env:Path = [System.Environment]::GetEnvironmentVariable("Path","User")

To try out an unstable release visit the edge docs.


Radius offers a free Codespace option for getting up and running with a Radius environment in seconds:

Open in GitHub Codespaces


Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing Azure resources.

Azure Cloud Shell for bash doesn’t have a sudo command, so users are unable to install Radius to the default /usr/local/bin installation path. To install the rad CLI to the home directory, run the following commands:

export RADIUS_INSTALL_DIR=./
wget -q "https://raw.githubusercontent.com/radius-project/radius/main/deploy/install.sh" -O - | /bin/bash

You can now run the rad CLI with ./rad.

PowerShell for Cloud Shell is currently not supported.


Visit Radius GitHub releases to select and download a specific version of the rad CLI.

You may be prompted for your sudo password during installation, as the installer places the rad binary under /usr/local/bin. If you are unable to sudo you can install the rad CLI to another directory by setting the RADIUS_INSTALL_DIR environment variable with your intended install path. Make sure you add this to your path (Unix, Windows) if you wish to reference it via rad, like in the docs.

Verify the rad CLI is installed correctly by running rad version.

Example output:

RELEASE     VERSION     BICEP       COMMIT
0.30.0      v0.30        0.11.13     2e60bfb46de73ec5cc70485d53e67f8eaa914ba7

Step 4: Install the Radius-Bicep VS Code extension

Visual Studio Code offers the best authoring experience for Radius and Bicep. Download and install the Radius Bicep extension to easily author and validate Bicep templates:

  1. To install the Radius Bicep extension, search for Radius Bicep in the Extensions tab in VSCode or in the Visual Studio marketplace

    Screenshot of Radius Bicep extension in VSCode Marketplace

  2. Select Install

To verify you’ve installed the extension, open any file with the .bicep file extension and start authoring Radius application to verify the auto-complete and other validation features.

To try out an unstable release visit the edge docs.

Step 5: Initialize the Radius control-plane and the Radius Environment

Initializing Radius installs the Radius control-plane and creates a Radius Environment. The control-plane is a set of services that provide the core functionality of Radius, running in the radius-system namespace.

  1. Create a Kubernetes cluster

    Radius runs inside Kubernetes. Create one from the supported k8s clusters

    If you don’t have a preferred way to create Kubernetes clusters, you could try using k3d, which runs a minimal Kubernetes distribution in Docker.

    Ensure your cluster is set as your current context:

    kubectl config current-context
    
  2. Initialize a new Radius Environment with rad init:

    rad init
    

    Select Yes to setup the app.bicep in the current directory

    Initializing Radius...
    
    🕔 Install Radius v0.30
       - Kubernetes cluster: kind
       - Kubernetes namespace: radius-system
    ⏳ Create new environment default
       - Kubernetes namespace: default
       - Recipe pack: local-dev
    ⏳ Scaffold application
    ⏳ Update local configuration
    
  3. Verify the initialization by running:

    kubectl get deployments -n radius-system
    

    You should see:

    NAME                      READY   UP-TO-DATE   AVAILABLE   AGE
    applications-rp           1/1     1            1           53s
    bicep-de                  1/1     1            1           53s
    controller                1/1     1            1           53s
    ucp                       1/1     1            1           53s
    contour-contour           1/1     1            1           46s
    

    You can also use rad env list to view your environment:

    rad env list