AKS Windows Containers

Published
Length
3 min read

Luis Felipe Dias

All posts

You run aks windows containers by adding a Windows node pool to a Linux control plane. Then you use node selectors and Kubernetes RBAC to route pods and control user access. Many teams start by giving engineers broad cluster admin roles to test these workloads. Overly broad roles let anyone open a shell on a pod or read sensitive secrets. How aks windows containers and native roles work A Kubernetes cluster needs Linux nodes to run basic system components. You add Windows node pools alongside

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You run aks windows containers by adding a Windows node pool to a Linux control plane. Then you use node selectors and Kubernetes RBAC to route pods and control user access. Many teams start by giving engineers broad cluster admin roles to test these workloads. Overly broad roles let anyone open a shell on a pod or read sensitive secrets.

How aks windows containers and native roles work

A Kubernetes cluster needs Linux nodes to run basic system components. You add Windows node pools alongside those Linux nodes to run Windows apps. Your deployment manifests must target the right operating system so pods land on Windows nodes. Once the pods run, Kubernetes RBAC controls who can view or change them.

In Kubernetes RBAC, a Role or ClusterRole holds a set of permission rules. These rules are always additive, which means there are no deny rules at all. A Role sets permissions inside one single namespace for your team. A ClusterRole works across the whole cluster and covers cluster-scoped resources like nodes. It can also cover namespaced resources across every namespace in the cluster.

You link these rules to users or groups with a binding. A RoleBinding grants permissions inside one namespace and can reference a Role or a ClusterRole. A ClusterRoleBinding grants permissions across the entire cluster at once. When engineers debug Windows pods, they often need to read logs or open a shell. Kubernetes treats pod logs and exec sessions as subresources in the API URL. Your RBAC rules must grant access to the pod log or exec subresource by name.

What native setup solves and what it leaves open

Native RBAC and node pools solve the core placement and login problems. They ensure Windows pods run on Windows nodes and block unauthorized API calls. You can limit a developer to one namespace using a standard RoleBinding. You can also separate read-only log access from interactive shell access at the API level.

Still, native RBAC only checks permissions when a session starts. Once an engineer opens an exec session into a Windows container, RBAC steps aside. It cannot see or control what commands the user runs inside that shell. A user with exec rights can inspect local files, dump memory, or read secrets.

AKS Managed Identity + Rootless Containers: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Also, Kubernetes RBAC does not support time-bound approvals for sensitive actions out of the box. Teams often leave pod exec permissions turned on all day for on-call staff. Static cluster credentials also end up on developer laptops to make daily work easier. Also, native API audit logs only record that an exec session started on a pod. They do not capture the actual shell commands or text output from that session. This leaves a major gap when you need to review what happened during an incident.

How to tighten access to Windows node pools

Start by removing cluster-wide bindings from regular developer accounts right away. Give each team a RoleBinding scoped only to their own app namespace. Separate routine log reading from interactive shell permissions in your daily role definitions. Keep pod exec rules out of default roles so shells are not always open.

Audit your RoleBindings and ClusterRoleBindings often to remove stale user accounts. Check which service accounts mounted inside your Windows pods hold extra API permissions. Even with clean roles, you still need visibility into live shell commands and data output.

Govern kubectl and API calls in flight

Identity providers and Kubernetes RBAC decide who logs into a cluster. They cannot redact keys inside returned JSON objects or hold a risky delete call for review. By design, hoop.dev runs as an open-source proxy, a sidecar for your Kubernetes API, checking requests and responses without replacing RBAC.

First, hoop.dev guardrails refuse banned methods, paths, or headers before they run. Next, hoop.dev data masking rewrites sensitive keys in returned Secret, ConfigMap, and log responses in memory, and writes each decision to the audit trail. Explore the repo on GitHub.

Frequently asked questions

Can a cluster run only Windows nodes?

No, a cluster always requires at least one Linux node pool at all times. Core Kubernetes system pods must run on Linux nodes to keep the cluster working.

How does Kubernetes RBAC control shell access to Windows pods?

Kubernetes uses the pods exec subresource to control who can open a container shell. You must include this subresource in a Role or ClusterRole to allow interactive commands.

Can I add a deny rule in Kubernetes RBAC to block specific pods?

No, Kubernetes RBAC permissions are purely additive and never support deny rules. To block access, you must remove the user from the RoleBinding or ClusterRoleBinding.

The query runs. The emails stay hidden.