Quick Start: Deploy a containerized application

Perform a quick installation of Radius and deploy your first application

This guide will show you how to quickly get started with Radius. You will do a basic installation of Radius on a Kubernetes cluster then deploy the Todo List sample application.

Prerequisites

For this quick start, you will only need a Kubernetes cluster. To install Radius your user must have the cluster-admin role. Any Kubernetes cluster will work including AKS and EKS. However, since this is a quick start, running a Kubernetes cluster on your workstation with k3d or kind is recommended.

Install the Radius CLI

Install the Radius CLI on your workstation with the appropriate installation script:


To try out a stable release visit the latest docs.

To install the latest edge release, first install ORAS. Then, run the following command to install the Radius CLI:

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

To try out a stable release visit the latest docs.

To install the latest edge release, first install ORAS. Then, run the following command to install the Radius CLI:

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

To try out a stable release visit the latest docs.

To install the latest edge release, first install ORAS. Then, run the following command to install the Radius CLI:

$script=iwr -useb "https://raw.githubusercontent.com/radius-project/radius/main/deploy/install.ps1"; $block=[ScriptBlock]::Create($script); invoke-command -ScriptBlock $block -ArgumentList edge

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 Radius 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

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

You may be prompted for your root or administrator password during installation. If you do not have permission to the default installation location, you can set the RADIUS_INSTALL_DIR environment variable with your preferred install directory.

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

Install Radius

Create a new directory for the Todo List application:

mkdir todolist
cd todolist

Ensure your cluster is set as your current context using kubectl config current-context. If the context needs updating, change it using kubectl config set-context <context-name>. Then install Radius using rad initialize command:

rad initialize

Select Yes to setup application in the current directory.

Example output:

Initializing Radius...

✅ Install Radius edge
    - Kubernetes cluster: k3d-k3s-default
    - Kubernetes namespace: radius-system
✅ Create new environment default
    - Kubernetes namespace: default
    - Recipe pack: local-dev
✅ Scaffold application todolist
✅ Update local configuration

Initialization complete! Have a RAD time 😎

Run the Todo List Application

In addition to installing Radius, the rad initialize command creates a sample application definition, app.bicep:

extension radius

@description('The Radius Application ID. Injected automatically by the rad CLI.')
param application string

resource demo 'Applications.Core/containers@2023-10-01-preview' = {
  name: 'demo'
  properties: {
    application: application
    container: {
      image: 'ghcr.io/radius-project/samples/demo:latest'
      ports: {
        web: {
          containerPort: 3000
        }
      }
    }
  }
}

Use the rad run command to deploy the application and setup port forwarding.

rad run app.bicep

This command:

  • Creates a Deployment on the Kubernetes cluster
  • Since a containerPort was specified, creates a ClusterIP Service on the Kubernetes cluster
  • Sets up port forwarding from localhost to the container
  • Sets up port forwarding from localhost to the Radius Dashboard
  • Streams container logs to your terminal

Browse the Todo List Application UI

Browse to the Todo List application by visiting http://localhost:3000. Notice that the Radius Connections section says “No connections defined.” In the five part tutorial, you will add a database and a connection between the container and the database.

Browse the Radius Dashboard

Browse to the Radius Dashboard by visiting http://localhost:7007. Find the Todo List Application under the Applications tab and examine its resources.

View the Application Graph

The rad app graph command shows you all the resources that the application is composed of.

rad app graph

You should see the following output, which lists the underlying Kubernetes resources running the application.

Displaying application: todolist

Name: demo (Applications.Core/containers)
Connections: (none)
Resources:
  demo (apps/Deployment)
  demo (core/Service)
  demo (core/ServiceAccount)
  demo (rbac.authorization.k8s.io/Role)
  demo (rbac.authorization.k8s.io/RoleBinding)

Congratulations, you have deployed your first application using Radius!

Cleanup

Delete the Todo List application:

rad app delete todolist

Optionally, uninstall Radius using the purge argument to remove Radius and all data:

rad uninstall kubernetes --purge



Next step: Read Radius concepts