Home/Templates/Encrypt and authorise every call between services
Encrypt and authorise every call between services
Mutual TLS between every service, and a deny-by-default rule for which service may call which.
Argo CD
Why bother
Inside a cluster, any pod can usually call any other. A compromised pod is then one request away from every internal API. A service mesh gives each workload an identity, encrypts traffic between them, and lets you write which callers each service accepts. Its logs also show a responder exactly who talked to whom.
From a pod with no permission, call a protected service. The call is refused with 403. At Standard, the refusal is logged with the caller's identity.
How it works
Set it up
Pick your platform, then open the level you want. Each level is complete on its own. Read the comments in the files as you go. Anything with a real consequence is explained on the line where it happens.
Argo CD. Istio in strict mutual TLS mode with deny-by-default authorisation, deployed by Argo CD
What you need first
- For the quick start, a cluster already running Istio, with sidecar injection on for the application namespace.
- For Standard, Argo CD with a project named platform, as the bootstrap template creates, and this folder committed to your repository.
- A service account per workload, since a workload's service account is its identity in the mesh.
What it creates
- Mutual TLS required across the mesh, so plain connections are refused
- A namespace that refuses every call until a policy allows it, and one allow rule naming the caller by service account
- Istio 1.31.1 from pinned charts, with two control plane replicas (Standard)
- A deny on callers with no mesh identity, an allow for the ingress gateway, and access logs for refused and failed requests (Standard)
The code
Quick startReady
kubectl config current-context
Shows which cluster kubectl is pointed at. Check it first.kubectl apply -f policies.yaml
Hands the Application to Argo CD.kubectl -n argocd get applications
Lists applications with their sync and health status.
Kubernetes schema passed
Last run 2026-10-02.
Open policies.yaml as plain text
StandardReady
repoURL: https://github.com/your-org/your-cluster-config.gitistio.yaml, line 86
kubectl config current-context
Shows which cluster kubectl is pointed at. Check it first.kubectl apply -k .
Applies everything the kustomization lists, in order.kubectl -n argocd get applications
Lists applications with their sync and health status.
Kubernetes schema passedBuilds passed
Last run 2026-10-02.
Open istio.yaml as plain text
Open kustomization.yaml as plain text
Open mesh.yaml as plain text
Open namespace-shop.yaml as plain text
HardenedReady
kubectl config current-context
Shows which cluster kubectl is pointed at. Check it first.kubectl apply -k .
Applies everything the kustomization lists, in order.kubectl -n argocd get applications
Lists applications with their sync and health status.
Builds passed
Last run 2026-10-02.
Open kustomization.yaml as plain text
How to check it worked
From a pod running as any service account other than the allowed caller, call the backend. It answers 403 with RBAC: access denied. From the allowed caller, it answers 200.
Istio applies policies in its root namespace to every workload, including the ingress gateway, which outside users reach with no mesh identity. Standard keeps authorisation policies in each application namespace.
An allow-nothing policy refuses the ingress gateway too, and health checks that do not go through the sidecar. Each needs its own allow rule.
Strict mutual TLS refuses callers with no sidecar. Onboard a namespace only once every workload that calls into it has one.
istiod rewrites its own webhook's failure policy after it starts. Standard tells Argo CD to ignore that field, or the application never shows as in sync.
How to undo it
Delete the Applications, or run kubectl delete -f policies.yaml. Removing the policies opens every call again at once.
What it costs
Each sidecar uses CPU and memory beside its workload, and adds a small delay to each call. The control plane runs as pods in the cluster.
Good to know
- Mutual TLS gives every workload an identity from its service account. Authorisation rules name those identities, so a stolen pod address is useless without the service account behind it.
- Roll out one namespace at a time: sidecars first, then strict mutual TLS, then deny by default with the allow rules you need.