4. Pulumi for Kubernetes
In this chapter you use Pulumi’s Kubernetes provider to deploy platform services onto the AKS cluster
provisioned in Chapter 3. Instead of running kubectl apply or helm install by hand, every cluster
resource is declared in Python and managed through the same pulumi up workflow you already know.
Provider Package
| Package | PyPI name | What it manages |
|---|---|---|
pulumi-kubernetes | pulumi_kubernetes | Any Kubernetes resource — manifests, Helm releases |
The provider connects to the cluster through a kubeconfig. For the AKS cluster created in Chapter 3,
Pulumi reads the kubeconfig directly from the KubernetesCluster output — no manual az aks get-credentials
step is required:
Pass this provider explicitly to every Kubernetes resource with opts=pulumi.ResourceOptions(provider=k8s_provider).
Helm Releases via Pulumi
The Kubernetes provider includes a helm.v3.Release resource that wraps helm install / helm upgrade.
You declare the chart name, repository URL, target namespace, and values — all in Python. Pulumi tracks the
release in state and performs helm upgrade or helm uninstall on subsequent runs, just like any other
resource.
What We Deploy
| Service | Helm chart | Role |
|---|---|---|
| Traefik | traefik | Ingress controller — routes external traffic into the cluster |
| Cert-Manager | cert-manager | Automates TLS certificate issuance via Let’s Encrypt |