Skip to content

[BUG] Deploy application wizard generates deployment.yaml with SYS_PTRACE, rejected by AKS Automatic baseline policy #5999

Open

Description

Describe the bug

In the portal's Deploy application wizard (Kubernetes center > Clusters > Create > Deploy application), Generate application deployment files produces a deployment.yaml that adds SYS_PTRACE to the container capabilities. On an AKS Automatic cluster, the managed baseline policy rejects the deployment.

Draft fixed this in Azure/draft#632 (via Azure/draft#634, merged 2025-12-15). The portal still generates SYS_PTRACE.

To Reproduce

  1. Go to Kubernetes center > Clusters > Create > Deploy application, and select Deploy your application.
  2. On Application, select Generate application deployment files.
  3. On Cluster, select Create Automatic Kubernetes cluster.
  4. Deploy, and merge the generated pull request.
  5. The deploy job fails:
configmap/pdbauto-config created
horizontalpodautoscaler.autoscaling/pdbauto created
poddisruptionbudget.policy/pdbauto created
service/pdbauto created
Error from server (Forbidden): error when creating "/home/runner/work/_temp/manifests/deployment.yaml": deployments.apps "pdbauto" is forbidden: ValidatingAdmissionPolicy 'aks-managed-baseline-capabilities' with binding 'aks-managed-baseline-capabilities-binding' denied request: Disallowed capabilities detected: container "pdbauto" has disallowed capabilities: [SYS_PTRACE]

Run: https://github.com/pdebruin/asp10/actions/runs/36756947858

Removing SYS_PTRACE from manifests/deployment.yaml fixes it: https://github.com/pdebruin/asp10/actions/runs/36757691962

Expected behavior

The generated manifests deploy to the AKS Automatic cluster the same wizard creates.

Additional context

The quickstart states the generated manifests drop all capabilities and only allow a limited set following the baseline Kubernetes Pod Security Standards. The baseline capabilities list does not include SYS_PTRACE; the other 13 capabilities in the generated file match it exactly.

Related: #5998

Environment

  • Azure portal, Microsoft Edge

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions