how we proceed without autoscaler supporting the --startup-taint flag.

Ompal Singh 0 Reputation points
2026-10-13T15:59:37.0233333+00:00

Hi team, we need guidance on an AKS limitation.

Our setup: We run Istio ambient mesh on AKS. A node must carry the taint cni.istio.io/not-ready:NoSchedule from the moment it registers, so that regular workload pods don't get scheduled before the node's mesh data plane is ready (otherwise their traffic bypasses the mesh — a security gap). Istio's controller only removes this taint once the node is ready; per Istio's own docs, the cluster operator is responsible for adding the taint to every new node — Istio does not add it.

What we need: every new node — including nodes the cluster‑autoscaler brings up — to come up already tainted, with the taint being removable (so Istio can clear it when ready and it stays cleared). On EKS we do this via kubelet --register-with-taints.

Why the AKS GA options don't fit:

  • nodeTaints on the agent pool is permanent and reconciled — after Istio removes the taint, AKS re‑adds it, so the node stays unschedulable. Not usable for a startup taint.
  • nodeInitializationTaints looks like the right equivalent, but it's preview‑only not GA, we only use GA SDK, so we can't adopt it.
  • The managed cluster‑autoscaler also doesn't expose --startup-taints/--ignore-taints.

Our question: Is there a GA‑supported way on AKS to apply a removable taint to nodes at registration (including autoscaler‑scaled nodes) — i.e. an equivalent to kubelet --register-with-taints? If not, what approach do you recommend for this scenario? We'd like to confirm the supported pattern before we build it.

Thanks,
Ompal singh

Azure Kubernetes Service
Azure Kubernetes Service

An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Andriy Bilous 12,516 Reputation points MVP
    2026-10-14T04:47:11.52+00:00

    Hello Ompal Singh

    Your understanding of the limitations is correct for the AKS-managed Cluster Autoscaler, but there is another supported option worth considering.

    Microsoft currently documents:

    • nodeTaints - persistent AKS-managed taints. They are not suitable for Istio to remove dynamically.
    • nodeInitializationTaints - designed for exactly this purpose, but still marked Preview.
    • Managed Cluster Autoscaler does not expose arbitrary --startup-taint or kubelet --register-with-taints configuration through the supported AKS settings.

    Microsoft's AKS initialization taints documentation and AKS GitHub feature request #3464 confirm the preview status.

    However, AKS Node Auto-Provisioning (NAP), which uses managed Karpenter, supports startupTaints. NAP is generally available and is a supported alternative to the traditional Cluster Autoscaler.

    Microsoft explicitly documents that NAP applies startup taints to provisioned nodes without requiring application pods to tolerate them.

    For example, add the following to your NAP NodePool under spec.template.spec:

    startupTaints:
      - key: cni.istio.io/not-ready
        effect: NoSchedule
    

    This provides the intended behavior:

    Karpenter creates the node with the startup taint.

    Regular workloads cannot schedule while the taint is present.

    Istio's untaint controller removes it when the Istio CNI agent reports ready.

    Karpenter does not treat the startup taint as a permanent scheduling restriction.

    Microsoft: Configure NAP NodePools and Karpenter startup taints.

    If migration to NAP is acceptable, test this approach with scale-from-zero, autoscaling, and node replacement. Ensure Istio's CNI components tolerate the startup taint and that all workload-eligible NodePools enforce the same protection.

    If you must retain the traditional AKS-managed Cluster Autoscaler one additional supportability distinction: Microsoft's AKS Istio add-on documentation still lists ambient mode as unsupported by the managed Istio add-on. The NAP solution therefore does not imply Microsoft support for the complete self-managed Istio ambient configuration.

    For your security-sensitive scenario, I would favor GA NAP with startupTaints, subject to validating the complete Istio readiness and traffic-enforcement behavior in your environment.

    Was this answer helpful?

    0 comments No comments

  2. Rukshan edirisinghe 1,645 Reputation points
    2026-10-14T04:46:13.5866667+00:00

    Hi @Ompal Singh

    You've read the situation correctly. Per the current AKS docs, node initialization taints (--node-init-taints / nodeInitializationTaints) are still preview, regular nodeTaints are owned by the AKS API and can't be cleared from Kubernetes, and the managed autoscaler doesn't expose --startup-taints. So there isn't a GA AKS setting that does exactly what --register-with-taints does on EKS.

    The GA-only pattern I'd look at is doing it in Kubernetes itself, with a mutating admission webhook on Node creation:

    1. Use a policy engine you're already comfortable with (Kyverno and Gatekeeper mutation can both do this) or a small custom webhook, scoped to CREATE on nodes.
    2. Have it add cni.istio.io/not-ready:NoSchedule to spec.taints when the node object is first created. Because it happens at creation, the node is tainted before the scheduler ever sees it as schedulable, including nodes from autoscaler scale-ups.
    3. Match only on CREATE, not UPDATE. That way, when the Istio CNI agent removes the taint, the webhook doesn't put it back.
    4. Run the webhook's pods on your system node pool and give them a toleration for that taint, so they never depend on a node that's waiting for them.
    5. Think about failurePolicy up front. Fail is safer for your security goal but can block node registration if the webhook is down. Ignore won't block nodes but reopens the gap. Most teams pick Fail and run the webhook with at least two replicas.

    It's standard Kubernetes rather than an AKS feature, so if you need a formal "supported pattern" statement, it's worth raising a support case to confirm before building. Test it with a scale-up and a node image upgrade, since those are the paths where new Node objects are created.

    Are your workload node pools Linux-only, or do you also have Windows pools in the mix?

    If this answered your question, please consider accepting it as the answer. If the webhook approach runs into trouble with node registration, let me know and I'll be happy to keep helping.

    Reference:

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.