Skip to content

timoknapp/az-aks-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure AKS Demo

architecture

Prerequisites

  • Azure CLI version 2.47.0 or later
  • kubectl

Getting started

Create parameters.json

cat <<EOF > parameters.json
{
    "postgresServerAdminPassword": { "value": "A$(openssl rand -hex 6)#" }
}
EOF

Enable / disable private AKS cluster

Link to documentation

# Install the aks-preview extension
az extension add --name aks-preview

# Update the extension to make sure you have the latest version installed
az extension update --name aks-preview

# Register the EnableAPIServerVnetIntegrationPreview feature flag using the az feature register command.
az feature register --namespace "Microsoft.ContainerService" --name "EnableAPIServerVnetIntegrationPreview"
# Verify the registration status using the az feature show command - this may take some time
az feature show --namespace "Microsoft.ContainerService" --name "EnableAPIServerVnetIntegrationPreview"
# Re-register the provider
az provider register --namespace "Microsoft.ContainerService"

Deploy Resources to Azure

resourceGroupName="rg-aks-demo-001"
location="northeurope"
deploymentName="aks-demo-001"

# create a resource group
az group create -n $resourceGroupName -l $location

# modify the template as needed
az deployment group create \
        -g $resourceGroupName \
        -n $deploymentName \
        --template-file main.bicep \
        --parameters parameters.json

# Enable private cluster mode
az aks update -n <cluster-name> \
    -g <resource-group> \
    --enable-private-cluster

Adding a node pool to the cluster

# Update these values so that they match the actual deployed resources
resourceGroupName="rg-aks-demo-001"
clusterName="aksdemo1234-cluster"
nodePoolName="nodepool2"

deploymentName="aks-demo-$nodePoolName-001"

az deployment group create \
  --name $deploymentName \
  --resource-group $resourceGroupName \
  --template-file ./modules/nodepool.bicep \
  --parameters clusterName="$clusterName" nodePoolName="$nodePoolName"

About

Demo of AKS in combination with App Gateway

Topics

Resources

Stars

Watchers

Forks

Languages