What to lock down before migrating Kubernetes workloads to AKS: the 10-point compliance and governance checklist
The compliance and governance requirements to settle before the first Kubernetes workload moves to Azure AKS: Entra ID and Azure RBAC, disabled local accounts, Azure Policy for AKS, private cluster, network policy, Key Vault CSI, audit log retention, Defender for Containers, data residency and Azure compliance scope, with what is hard to change later.
Ten requirements belong before the first workload moves to AKS: Microsoft Entra ID with Azure RBAC for Kubernetes, local accounts disabled, the Azure Policy add-on with assignments in Audit, a private or IP-restricted API server, a network policy engine, Key Vault for secrets, control plane audit logs with a retention period your auditor accepts, Defender for Containers, a region that matches your data residency commitments, and a written map of which compliance offerings cover AKS and which controls stay yours.
Several of these are expensive to change after cutover. Changing the network policy engine reimages every node pool, switching a public cluster to private needs API Server VNet integration, disabling local accounts later means rotating cluster certificates, and moving regions means moving data.
AKS does not log the control plane by default.kube-audit and kube-audit-admin only reach Log Analytics once you create a diagnostic setting, and the default analytics retention is 30 days, which is shorter than most audit periods.
Azure's certifications do not transfer to your workloads. Microsoft writes that "You're wholly responsible for ensuring your own compliance", and its audit reports list exactly which services are in scope. Inheriting the platform controls still leaves your configuration, identities and data handling to you.
Qovery, the Agentic DevOps platform, connects to the AKS cluster you build to this checklist (with qovery cluster install) and adds the deployment layer on top: per-environment RBAC, an audit log of who deployed what, preview environments and start/stop schedules, inside your own Azure subscription. It does not make you compliant and does not replace Azure Policy, Defender or your auditor.
I have watched the same AKS migration go sideways three times. The team moves fast, gets workloads running on a public cluster with local admin credentials, and plans to "harden it in phase two". Phase two arrives with the auditor, and every control they skipped now needs a change window, a node reimage or a certificate rotation on a cluster carrying production traffic.
The stakes are measurable. In Red Hat's 2024 survey of 600 professionals, nearly 9 in 10 organizations had at least one container or Kubernetes security incident in the previous 12 months, 67% had delayed or slowed deployments over security concerns, and 46% lost revenue or customers after an incident (Red Hat State of Kubernetes Security 2024).
This article is the checklist I wish those teams had used, with what each item is, why it has to be decided before migration, and the Microsoft source for each claim. If you are choosing tools rather than requirements, read our companion pieces on the six control layers of a governed AKS migration and the AKS migration tool stack.
What compliance and governance requirements should you lock down before migrating to AKS?
Lock down identity, admission policy, network exposure, secrets, audit logging, threat detection, region and compliance scope before the first production workload lands. Each one either changes how workloads must be deployed or is disruptive to retrofit.
#
Requirement
Azure control
Why it must come first
Evidence your auditor will ask for
1
Central identity for humans
Microsoft Entra ID integration + Azure RBAC for Kubernetes authorization
Every kubeconfig and CI credential you hand out during migration becomes a habit
Role assignment export, group membership
2
No backdoor admin
--disable-local-accounts
Disabling later means rotating cluster certificates
properties.disableLocalAccounts: true
3
Admission policy
Azure Policy add-on (Gatekeeper v3), pod security baseline or restricted initiative
Deny effects do not evict running pods, so violations you admit now stay
Policy compliance report
4
Private control plane
Private cluster or API Server VNet integration, else authorized IP ranges
Converting a public cluster needs API Server VNet integration
Cluster network profile, policy result
5
Pod-to-pod network policy
Cilium (recommended), Calico or Azure NPM
Changing engine reimages node pools; Azure NPM on Linux ends 30 Sept 2028
NetworkPolicy manifests, engine setting
6
Secrets outside manifests
Key Vault provider for Secrets Store CSI Driver, KMS etcd encryption
Every app's deployment spec changes to mount secrets
Key Vault access logs, RBAC on vault
7
Control plane audit trail
Diagnostic settings for kube-audit-admin (or kube-audit) to Log Analytics
Not collected by default, and logs cannot be backfilled
Workspace retention setting, sample queries
8
Threat detection and image scanning
Microsoft Defender for Containers
Alerts only cover activity after you enable it
Defender recommendations and alerts
9
Data residency
Region and geography choice, EU Data Boundary where relevant
You need to know which controls you inherit and which you own
Shared responsibility matrix
The rest of this article goes through the ten items in the order I would set them up.
Why do these controls have to be in place before the first workload moves?
Because AKS makes several of them disruptive to add later, and every exception you admit during migration becomes a dependency someone will defend in six months. Here is what Microsoft's own documentation says about retrofitting:
Network policy engine: installing Azure NPM or Calico on an existing cluster "triggers each node pool to be reimaged simultaneously", and switching engines goes through none first (AKS network policies).
Private API server: only "existing AKS clusters enabled with API Server VNet integration can have private cluster mode enabled" (AKS private clusters).
Local accounts: after disabling them on a cluster people already used, "the administrator must rotate the cluster certificates" (AKS local accounts).
Admission policy: when a deny policy lands on a cluster with existing resources, "any preexisting resource that isn't compliant with the new policy continues to run" until it is rescheduled (Azure Policy for Kubernetes).
Retirements on the calendar: AKS ends support for kubenet on 31 March 2028 and for Azure NPM on Linux nodes on 30 September 2028. A cluster you build in 2026 with either will need another migration.
Each of these is documented by Microsoft, and each one costs a change window on a cluster that already carries production traffic.
How should identity and access be set up for AKS before migration?
Set up Microsoft Entra ID integration with Azure RBAC for Kubernetes authorization, disable local accounts, and give workloads their own managed identities through Workload ID. Do it on day one, so nobody's migration scripts depend on the admin kubeconfig.
The local admin account is the item teams forget. Microsoft is blunt about it: "When you deploy an AKS cluster, local accounts are enabled by default. Even when you enable RBAC or Microsoft Entra integration, --admin access still exists as a non-auditable backdoor option" (AKS local accounts). Create the cluster with --enable-aad, an admin group via --aad-admin-group-object-ids, and --disable-local-accounts. A request for static credentials then fails with "Getting static credential isn't allowed because this cluster is set to disable local accounts."
For workloads, use managed identities and Microsoft Entra Workload ID instead of credentials in Kubernetes Secrets. If you are coming from EKS, Workload ID is the replacement for IRSA, and every service account annotation in your Helm charts changes. Our EKS to AKS migration runbook covers that mapping.
Three built-in Azure Policy definitions let you enforce this at the subscription or management group level: "Azure Kubernetes Service Clusters should enable Microsoft Entra ID integration", "Azure Kubernetes Service Clusters should have local authentication methods disabled", and "Azure Kubernetes Service Clusters should enable workload identity" (built-in policies for AKS).
Which Azure Policy assignments should be live before cutover?
Install the Azure Policy add-on and assign the "Kubernetes cluster pod security baseline standards for Linux-based workloads" initiative in Audit before the first namespace moves, then flip to Deny namespace by namespace once the violation report is clean. Add the cluster-level built-ins for identity, private cluster and Defender at the management group.
How it works matters for planning. Azure Policy "extends Gatekeeper v3, an admission controller webhook for Open Policy Agent", supports the audit, deny, disabled and mutate effects, checks for assignment changes every 15 minutes and runs a full cluster scan on the same cycle (Azure Policy for Kubernetes). Two migration consequences follow:
You cannot bring your own Gatekeeper along. "Installations of Gatekeeper outside of the Azure Policy Add-on aren't supported." If your source clusters run Gatekeeper with custom constraint templates, plan to port them into Azure Policy custom definitions, or choose Kyverno as your second engine.
Deny is not retroactive. Workloads you admit in Audit mode keep running after you switch to Deny, until they are rescheduled. That is the argument for cleaning violations during the migration wave, not after.
The built-in list worth assigning before cutover, by exact name (policy reference):
Azure Policy Add-on for Kubernetes service (AKS) should be installed and enabled on your clusters
Kubernetes cluster pod security baseline standards for Linux-based workloads (or the restricted standards initiative)
Azure Kubernetes Service Private Clusters should be enabled, or Authorized IP ranges should be defined on Kubernetes Services
Azure Kubernetes Service clusters should have Defender profile enabled
Azure Kubernetes Clusters should enable Key Management Service (KMS)
Azure Kubernetes Clusters should disable SSH, and Azure Kubernetes Service Clusters should disable Command Invoke
Add your own rules for required labels (owner, cost-center, data-classification) and allowed registries. Those labels are what your FinOps and incident processes will key on later.
How do you lock down the network: private cluster, network policy and egress?
Decide three things before creation: whether the API server is private, which network policy engine enforces pod-to-pod rules, and how egress leaves the cluster. All three are cheap on day one and disruptive later.
API server exposure. In a private cluster, the API server has internal addresses and "network traffic between your API server and your node pools remains only on the private network" (AKS private clusters). Plan for the side effects: Microsoft-hosted Azure DevOps agents are not supported, so you need self-hosted runners on a connected network, and your DNS design has to resolve the private zone. If a private cluster is not possible, define authorized IP ranges, which only apply to the public endpoint. Use --disable-public-fqdn when your compliance requirements say management must happen only over private connectivity.
Network policy. "By default, all pods in an AKS cluster can send and receive traffic without limitations" (AKS network policies). Microsoft recommends Cilium, through Azure CNI Powered by Cilium, which adds FQDN filtering and Layer 7 policy. Azure NPM is capped at 250 nodes and 20,000 pods and loses Linux support on 30 September 2028, so I would not start a new cluster on it. Write a default-deny NetworkPolicy per namespace into your migration templates, so every namespace arrives isolated.
Egress. If you route outbound traffic through Azure Firewall with userDefinedRouting, list the FQDNs each add-on needs before cutover. The Key Vault CSI driver, Defender sensor and Azure Policy add-on all need outbound rules, and a missing one fails silently until a secret rotation or a policy sync stops working.
Where should secrets live on AKS?
In Azure Key Vault, mounted through the Azure Key Vault provider for Secrets Store CSI Driver, with Key Vault access governed by Azure RBAC and etcd encrypted with KMS. Decide this before migration, because it changes every deployment spec that currently reads a Kubernetes Secret.
The add-on (--enable-addons azure-keyvault-secrets-provider) mounts secrets, keys and certificates as a CSI volume, can sync them to Kubernetes Secrets, and supports autorotation of mounted contents (Key Vault CSI driver). Two details catch migrations:
A container that mounts a secret through subPath does not receive rotated values, a Kubernetes limitation. The app has to watch the file or restart.
The add-on creates a managed identity named azurekeyvaultsecretsprovider-xxxxx in the node resource group, and you cannot prevent its creation. Grant it, or your own Workload ID identity, the Key Vault Secrets User role and nothing broader.
For regulated data, enable KMS encryption for etcd so Kubernetes Secrets at rest use a key you control in Key Vault, and enforce it with the built-in KMS policy above.
Governed deployments on the AKS cluster you own.
Qovery, the Agentic DevOps platform, connects to your existing AKS cluster and gives your teams self-service deployments with RBAC, an audit log and per-environment controls, inside your own Azure subscription.
What logging and audit evidence do auditors expect from AKS?
They expect a control plane audit trail with retention that covers the audit period, plus threat detection evidence. AKS gives you neither by default, so create both before the first workload moves.
AKS exposes control plane resource logs, including kube-audit, which "contains all Kubernetes API Server audit logs including events with the get and list verbs", and kube-audit-admin, which excludes get and list and keeps only modifying requests (AKS monitoring reference). They only flow once you create a diagnostic setting. For most teams, kube-audit-admin is the right default, because it records every change at a fraction of the volume.
Then fix retention. "By default, all tables in a Log Analytics workspace retain data for 30 days", analytics retention can go up to two years, and total retention with low-cost long-term storage up to 12 years (Log Analytics retention). If your auditor reviews a 12-month period, a 30-day default means you will have nothing to show.
Enable Microsoft Defender for Containers at the same time. It covers posture management, agentless vulnerability assessment of registry images and running containers, and runtime threat detection with more than 60 Kubernetes-aware analytics mapped to MITRE ATT&CK. "Security alerts are only triggered for actions and deployments that occur after you enable Defender for Containers", which is one more reason not to wait.
Audit logs tell you which identity called the API. They do not tell you which pull request, which approval or which person triggered a deployment through a pipeline or a shared service account. Keep that record in your deployment layer too. Our audit evidence checklist for cloud migrations lists the artifacts SOC 2 and ISO 27001 auditors request.
How do data residency and region choice constrain an AKS migration?
Pick the region and geography from your data residency commitments first, then check that AKS and every service you depend on is available there. The region is the hardest decision to reverse, because reversing it means moving data.
Microsoft's commitment is specific: "Microsoft will not store or process customer data outside the customer-specified Geo without your authorization", and it "may copy customer data between regions within a given Geo for data redundancy or other operational purposes" (Azure data residency). Read the exceptions on the same page before you sign a data processing agreement. Non-regional services such as Microsoft Entra ID "may store Microsoft Entra directory data globally", and AI services with Global deployment types may process prompts in any region.
For a migration, that means three concrete checks:
Every resource in one Geo: cluster, node resource group, Log Analytics workspace, Key Vault, container registry, backup vault. A Log Analytics workspace in another geography quietly moves your audit logs out of scope.
Paired and zone redundancy: the built-in policy "Azure Kubernetes Service Managed Clusters should be Zone Redundant" (preview) helps prove availability commitments.
European customers: check whether the EU Data Boundary applies to your contract, and document which global services still process identity data.
Azure is available in more than 60 regions (Azure compliance offerings), so the constraint is rarely availability. It is usually a GPU SKU, a managed database tier or a sovereign requirement in the one region your contract names.
Which Azure compliance offerings cover AKS, and what stays your job?
Azure holds a long list of offerings (SOC 1, 2 and 3, ISO 27001, 27017, 27018 and 27701, PCI DSS, HIPAA, FedRAMP, Germany C5, France HDS and many more), and each audit report states which services are in scope (Azure compliance documentation). Inheriting them covers Microsoft's side of the shared responsibility model. Your cluster configuration, identities, network rules, workloads and data handling remain your controls.
Microsoft's own wording leaves no room: "You're wholly responsible for ensuring your own compliance with all applicable laws and regulations" (Azure compliance offerings). Before migration, do three things:
Download the reports from the Service Trust Portal and confirm Azure Kubernetes Service, Key Vault, Azure Monitor and your registry appear in the scope of the frameworks you need.
Assign the matching regulatory initiative in Azure Policy (ISO 27001, PCI DSS, NIST SP 800-171, HIPAA HITRUST, CIS Azure Foundations) so the Defender for Cloud regulatory compliance dashboard tracks your configuration against it.
Write the responsibility matrix: for each control, Microsoft, your platform team, or the application team. This is where AKS migrations usually discover that nobody owns deployment approvals or environment lifecycle.
Which approach should you use to enforce this checklist?
Azure-native controls cover items 1 to 10 at the cluster and subscription level. The gap they leave is the human workflow: who may create an environment, who may deploy to production, and what the record of that decision looks like. Here is how the common approaches compare.
Approach
Best for
Covers cluster controls (1-10)
Covers deployment approvals and environment lifecycle
Effort without a platform team
Where it falls short
Azure-native only (Policy, Defender, Entra, Monitor)
Teams with an Azure-savvy ops engineer and few services
Yes
No
Medium
Developers still need kubectl or a pipeline with broad rights
Teams needing mutation, generated default NetworkPolicies, image signature checks
Yes, with extra rules
No
High
Another policy engine to own
Azure-native + Qovery
Teams that want self-service deployments into their own AKS without building a platform
Yes, Azure controls stay in place
Yes: RBAC per environment, audit log, preview environments, schedules
Low
Does not audit resources it did not deploy; no compliance certification transfers to you
Managed service partner
Organizations outsourcing operations entirely
Depends on contract
Depends on contract
Low for you, high cost
Vendor lock-in on people, slower changes
How does Qovery handle a governed AKS migration?
Qovery, the Agentic DevOps platform, sits on top of the AKS cluster you built to this checklist. It does not replace any item on it.
What you set up: create the AKS cluster with your landing zone (Entra ID, local accounts disabled, Azure Policy, private API or authorized IPs, Cilium, Key Vault, diagnostic settings, Defender), then connect it with qovery cluster install from the Qovery CLI, which installs Qovery's agent with Helm (Kubernetes BYOK docs). The cluster, the Azure subscription, the network, the logs and the Azure bill stay yours, and Qovery never hosts your apps.
What Qovery then runs inside your cluster:
Deployments from Git with an audit log of who deployed what and when, which fills the gap between kube-audit-admin (which identity called the API) and your change management record.
Per-environment RBAC, so a developer can deploy to a preview environment without production rights.
Preview environments per pull request and start/stop schedules, so non-production does not run all weekend.
API Policy Tokens that scope exactly what an AI coding agent may do, with each agent action attributed in the audit log.
What stays your job: Azure Policy, Defender, data residency, your auditor and your evidence. Qovery holds its own SOC 2 Type II report for its control plane (Qovery security), which does not make your workloads compliant.
If you are leaving a PaaS for Azure, the Heroku to Azure migration page shows the agentic path: an agent reads your repository and proposes a deployment plan into the Azure subscription you own, which you approve. To try Qovery first, the Free plan needs no credit card, and qovery demo up runs a local test cluster on your laptop.
How do I do this with Qovery from Claude Code or Cursor?
Once the AKS cluster is connected, a coding agent can deploy and inspect services on it through Qovery, within the permissions you grant. These are the only commands you need.
Install the Qovery Agent Skills for every compatible agent (Claude Code, Cursor, Codex, OpenCode, Gemini CLI):
Add the Qovery MCP Server to Claude Code over OAuth. It is read-only by default, which is what you want while you validate the migration:
BASH
claude mcp add --transport http qovery https://mcp.qovery.com/mcp --callback-port 4242
Only when you explicitly want the agent to change things (write access must also be enabled in the Qovery Console):
BASH
claude mcp add --transport http qovery "https://mcp.qovery.com/mcp?read_write=true" --callback-port 4242
The skills (qovery-onboard, qovery-deploy, qovery-troubleshoot and others) deploy, and the MCP Server operates what exists. Then ask in plain language, for example: "deploy this service with Qovery to our AKS cluster in a new staging environment and show me the plan first." The agent asks you to approve each action. See the AI agent quickstart.
Frequently asked questions
What compliance and governance requirements should I lock down before migrating Kubernetes workloads to Azure AKS?
Set up Microsoft Entra ID with Azure RBAC and disabled local accounts, the Azure Policy add-on with the pod security baseline initiative in Audit, a private or IP-restricted API server, a network policy engine (Cilium is Microsoft's recommendation), Key Vault for secrets, control plane audit logs with retention that covers your audit period, Defender for Containers, a region that matches your data residency commitments, and a map of which Azure compliance offerings cover AKS. Several of these, such as the network policy engine and private API server, are disruptive to change after workloads are running.
Does Azure's SOC 2 or ISO 27001 certification make my AKS workloads compliant?
No. Microsoft's reports cover the services in their audit scope, and Microsoft states that customers are "wholly responsible" for their own compliance. Your cluster configuration, identities, network rules, workloads and data handling are your controls, and your auditor will test them.
Are AKS control plane audit logs enabled by default?
No. You must create a diagnostic setting that sends kube-audit or kube-audit-admin to a Log Analytics workspace, and the default retention there is 30 days. Set analytics or total retention to cover your audit period before migration, because logs cannot be backfilled.
Can I make an existing public AKS cluster private after migration?
Only if the cluster uses API Server VNet integration, which supports enabling private cluster mode on an existing cluster. Otherwise, plan the private cluster before creation, or restrict the public endpoint with authorized IP ranges in the meantime.
Can Qovery deploy to an AKS cluster that already enforces Azure Policy and a private API server?
Yes. Qovery connects to an existing AKS cluster with qovery cluster install, and your Azure Policy assignments, network rules and Entra ID setup stay in place, so Qovery's workloads go through the same admission policies as everything else. Plan the outbound connectivity Qovery's agent needs, as you would for any add-on in a restricted network.
Does Qovery make an AKS migration compliant?
No. Qovery adds per-environment RBAC, an audit log of deployments, preview environments and schedules inside your own Azure subscription, which produces evidence auditors ask for about change control. Azure Policy, Defender for Containers, data residency and the compliance assessment itself remain your responsibility.
Morgan co-founded Qovery and leads engineering. He writes about Kubernetes architecture, DevOps best practices, and building resilient infrastructure at scale.
Next step
Governed deployments on the AKS cluster you own.
Qovery, the Agentic DevOps platform, connects to your existing AKS cluster and gives your teams self-service deployments with RBAC, an audit log and per-environment controls, inside your own Azure subscription.