Skip to main content

Deployment Security Guide

Security configurations included in this reference architecture and responsibilities for teams operating in production environments.

[!IMPORTANT] This document provides security guidance for informational purposes only. It does not constitute professional security advice and is not a substitute for your own security assessment. This reference architecture is licensed under the MIT License, provided "AS IS" without warranty of any kind. You are solely responsible for the security of your deployment, including configuration, operational practices, and compliance with applicable regulations. The project maintainers accept no liability for security incidents arising from the use of this architecture. Refer to official Azure security documentation for authoritative, current guidance.

Security Configuration Included in This Architecture

This architecture ships with these security configurations enabled by default. They represent a reasonable starting point for development and testing, not a production-ready security posture.

Network Security

ConfigurationDefaultReference
Private AKS clusterEnabled by default (Terraform variable)AKS private cluster
Azure CNI networkingEnabledAzure CNI overview
Network policy supportEnabledAKS network policies
NAT Gateway for egressConfiguredAKS outbound connectivity

Identity and Access

ConfigurationDefaultReference
Managed identitiesUser-assigned for AKSAKS managed identity
Workload identityFederated credentials for OSMOAKS workload identity
Entra ID integrationRBAC enabledAKS Entra integration

Secret Management

ConfigurationDefaultReference
Azure Key VaultCSI driver configuredKey Vault CSI driver
Terraform stateLocal backend (not encrypted)Terraform Azure backend

Container Security

ConfigurationDefaultReference
Microsoft DefenderConfigurable (should_enable_microsoft_defender)Defender for Containers
Azure Policy for AKSEnabledAzure Policy for AKS

Kubernetes Security

ConfigurationDefaultReference
RBACEnabledAKS RBAC
Pod securityDefault namespace policiesPod security standards

Your Deployment Responsibilities

Before Deployment

  • Conduct a security assessment for your target environment
  • Review all Terraform variables and override defaults inappropriate for your security posture
  • Evaluate network topology (private vs. public endpoints) for your requirements
  • Establish secret management policies (rotation schedules, access controls)
  • Verify Azure subscription security baselines (Azure Policy, Defender for Cloud)

During Operation

  • Monitor AKS cluster security events through Azure Monitor
  • Review Kubernetes RBAC bindings and service account permissions
  • Manage container image provenance and vulnerability scanning
  • Maintain network policy definitions appropriate for running workloads

Ongoing Maintenance

  • Update Terraform provider versions and module references
  • Patch base container images and NVIDIA runtime components
  • Review Azure Advisor security recommendations
  • Reassess security posture when adding workloads or scaling

Security Considerations Checklist

[!NOTE] This checklist highlights common security considerations for Azure and Kubernetes deployments. It is not exhaustive. Your organization's security requirements, compliance obligations, and threat model determine the complete set of controls you need.

CategoryConsiderationReference
NetworkEvaluate private vs. public AKS API serverAKS private cluster
NetworkDefine Kubernetes network policies for workload isolationAKS network policies
IdentityReview managed identity permissions and scopeAKS managed identity
IdentityVerify workload identity audience restrictionsWorkload identity
SecretsConfigure Key Vault access policies and rotationKey Vault rotation
SecretsMigrate Terraform state to a remote encrypted backendTerraform Azure backend
ComputeEnable Defender for Containers (should_enable_microsoft_defender)Defender for Containers
ComputeScan container images for vulnerabilitiesContainer image scanning
MonitoringEnable diagnostic settings on AKS and Key VaultAKS diagnostics
ComplianceReview Azure compliance offerings for your industryAzure compliance

Terraform State Security

This architecture uses a local Terraform state backend by default. Local state stores infrastructure details including resource IDs, network addresses, and configuration values in an unencrypted file on disk.

For team environments or production deployments, consider migrating to a remote backend with encryption. Refer to the Terraform Azure backend documentation for configuration details.

References

ResourceDescription
Azure security documentationAuthoritative security guidance for Azure services
AKS baseline architectureProduction-ready AKS security and networking patterns
Azure compliance documentationCompliance offerings and certifications
Terraform Azure backendRemote state backend configuration
Threat ModelSTRIDE-based threat analysis and remediation roadmap
Contributing security reviewContributor security checklist for pull requests

🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.