Skip to main content

Overview

Azure Kubernetes Service (AKS) is Microsoft’s managed Kubernetes offering that integrates with Azure services like Azure Database for PostgreSQL, Azure Cache for Redis, Azure Key Vault, and Azure Active Directory.
This guide covers deploying to AKS with production-ready configuration including Azure AD Pod Identity, Azure Database for PostgreSQL, Azure Cache for Redis, and Azure Key Vault integration.

Prerequisites

  • Azure subscription
  • Azure CLI (az) installed and configured
  • kubectl installed
  • helm installed

Install Prerequisites

Create Resource Group

Create AKS Cluster

Using Azure CLI

Advanced Configuration

Azure AD Workload Identity

Enable Workload Identity

Create Managed Identity

Create Federated Credentials

Create Kubernetes Service Account

Azure Database for PostgreSQL

Create PostgreSQL Server

Three databases required: Keycloak (identity), OpenFGA (authorization), and GDPR (compliance data storage per ADR-0041).

Initialize GDPR Schema

After creating the databases, initialize the GDPR schema:
Schema Details:
  • user_profiles: User profile data (GDPR Article 15, 16, 17)
  • user_preferences: User preferences (GDPR Article 16, 17)
  • consent_records: Consent audit trail, 7-year retention (GDPR Article 21, Article 7)
  • conversations: Conversation history, 90-day retention (GDPR Article 15, 20)
  • audit_logs: Compliance audit trail, 7-year retention (HIPAA §164.316(b)(2)(i), SOC2 CC6.6)
See GDPR Storage Configuration for retention policies and backup procedures.

Configure Private Endpoint

Azure Cache for Redis

Create Redis Cache

Azure Key Vault

Create Key Vault

Store Secrets

CSI Driver Integration

Use Secrets in Deployment

Azure Container Registry (ACR)

Create ACR

Build and Push Images

Application Gateway Ingress Controller

Install AGIC

Configure Ingress

Azure Monitor Integration

Enable Container Insights

Custom Metrics

Complete Deployment

Deploy:

Auto-Scaling

Cluster Autoscaler

Horizontal Pod Autoscaler

Cost Optimization

  • 1-year: Up to 40% savings
  • 3-year: Up to 60% savings
  • Apply to VMs, databases, and other services

Security Best Practices

Next Steps

Monitoring

Setup comprehensive monitoring

Disaster Recovery

Backup and recovery strategies

Security

Security hardening guide

Kustomize

Configuration management

AKS Deployment Ready: Production-grade deployment on Azure Kubernetes Service!