Skip to content

Latest commit

 

History

History
85 lines (63 loc) · 3.58 KB

File metadata and controls

85 lines (63 loc) · 3.58 KB

Quickstart

This quickstart guides you to deploy kubeup on Azure securely using client secrets with no dependency on email services. All events received by kubeup will be logged to a Log Analytics workspace.

Prerequisites

To complete this quickstart, you need the following services and tools:

  1. Azure subscription - Sign up for free
  2. Bash environment - Available on macOS/Linux by default, or Windows Subsystem for Linux on Windows
  3. Task - Build and deployment automation
  4. Azure CLI - Deploy Bicep templates to Azure
  5. Bicep CLI - Install with az bicep install

Alternatively, use Azure Cloud Shell which has all required tools preinstalled.

kubeup is designed for Azure Kubernetes Service (AKS) cluster operators. If you already have an AKS cluster, skip to the preparation of the .env file.

Deployment step-by-step

Create an AKS cluster (optional)

If you don't have an AKS cluster, create a basic cluster for testing using the included deployment script. Adjust the cluster name, resource group, and region as needed:

cd ./deploy
export KU_AKS_CLUSTER='my-aks'
export KU_AKS_RESOURCE_GROUP='my-aks-rg'
export KU_LOCATION='northeurope'
./aks.sh

Prepare the .env file

Create an .env file to store deployment configuration. Copy the template and edit it:

cp .env.template .env

Remove all entries from the template except those shown below. Provide your resource names, secrets, and preferred Azure region. If you created a cluster in the previous step, use the same names and region.

Tip: Create secure client secrets with openssl rand -hex 32.

# AKS cluster configuration
KU_AKS_CLUSTER='my-aks'
KU_AKS_RESOURCE_GROUP='my-aks-rg'

# kubeup deployment configuration
KU_APP_NAME='kubeup'
KU_RESOURCE_GROUP='kubeup-rg'
KU_LOCATION='northeurope'

# Client secrets for webhook authentication
KU_SECRET_1='...'
KU_SECRET_2='...'

Deployment

Deploy kubeup to Azure using the included Bicep templates. This creates a kubeup Azure Container App and webhook subscription through Azure Event Grid for all events emitted by your AKS cluster:

task deploy:azure

Verification

After deployment, it may take time before receiving notifications, depending on Kubernetes version availability or cluster upgrades.

To test kubeup immediately, trigger a Kubernetes update to a newer Kubernetes version and check the logs:

version=$(az aks get-upgrades -n $KU_AKS_CLUSTER -g $KU_AKS_RESOURCE_GROUP \
  --query 'controlPlaneProfile.upgrades[].kubernetesVersion' -o tsv | sort | head -1)
az aks upgrade -n $KU_AKS_CLUSTER -g $KU_AKS_RESOURCE_GROUP -k $version -y

Once Kubernetes events are published, you'll see log entries in your Log Analytics workspace's ContainerAppConsoleLogs_CL table.

Log entries in Azure Log Analytics

Query the last ten log entries with:

ContainerAppConsoleLogs_CL 
  | top 10 by time_d 
  | project Timestamp=unixtime_seconds_todatetime(time_d), Log_data_s, Log_msg_s 

Next steps

See the full deployment documentation to learn how to protect kubeup using Entra ID and enable email notifications.