Skip to content

Add bicep template for AKS using Azure Verified Modules#13

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-12
Draft

Add bicep template for AKS using Azure Verified Modules#13
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-12

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 3, 2025

This PR adds a complete bicep template for deploying Azure Kubernetes Service (AKS) using Azure Verified Modules, following the established patterns in the repository.

Files Added

  • aks/main.bicep - Subscription-scoped template that creates a resource group and calls the AKS module
  • aks/aks.bicep - Resource group-scoped template containing the AKS cluster and supporting infrastructure
  • aks/.cheatsheet - Deployment command reference for easy usage

Features

  • Virtual Network: Dedicated VNet with separate subnets for AKS cluster and services
  • AKS Cluster: Managed Kubernetes cluster with system-assigned managed identity
  • Auto-scaling: Node pool configured with auto-scaling (1-3 nodes, Standard_B2s VMs for cost optimization)
  • Azure CNI: Uses Azure Container Networking Interface for better integration
  • Azure Verified Modules: Leverages public AVM registry modules for consistency and best practices

Template Structure

The implementation follows the same patterns as existing templates in the repository:

// Subscription-scoped main.bicep creates resource group
resource rgaks 'Microsoft.Resources/resourceGroups@2022-09-01' = {
  name: 'rg-aks'
  location: resourceLocation
}

// Calls the AKS module with required parameters
module aks './aks.bicep' = {
  scope: rgaks
  name: 'aks'
  params: {
    resourceLocation: resourceLocation
    regionName: 'global'
    addressPrefixVnet: '10.1.0.0/16'
    addressPrefixAks: '10.1.0.0/24'
    addressPrefixServices: '10.1.1.0/24'
  }
}

Usage

Deploy the template using:

az deployment sub create --verbose --location westeurope --name aksdemo --template-file ./main.bicep

The template uses the same naming conventions, parameter patterns, and module structure as other templates in the repository (ase, managedrunners, etc.).

Fixes #12.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /usr/bin/../../opt/az/bin/python3 -Im azure.cli bicep list-available-modules (dns block)
    • Triggering command: bicep build main.bicep (dns block)
    • Triggering command: bicep build main.bicep --stdout (dns block)
  • app.aladdin.microsoft.com
    • Triggering command: /usr/bin/../../opt/az/bin/python3 -Im azure.cli bicep list-available-modules (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ration

Co-authored-by: h2floh <29010283+h2floh@users.noreply.github.com>
Copilot AI changed the title [WIP] Add bicep template for AKS Add bicep template for AKS using Azure Verified Modules Jun 3, 2025
Copilot AI requested a review from h2floh June 3, 2025 12:38
Copilot finished work on behalf of h2floh June 3, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bicep template for AKS

2 participants