Skip to main content
This guide demonstrates how to enable and validate mTLS (mutual TLS) in Cilium using SPIRE (SPIFFE Runtime Environment). It walks through configuring Cilium Helm values for encryption and authentication, installing/upgrading Cilium, deploying SPIRE, deploying a simple server and client, creating a CiliumNetworkPolicy that requires authentication, and observing the authentication flow in the Cilium agent logs. What you’ll learn:
  • How to enable transparent encryption and SPIRE-based authentication in Cilium.
  • How to deploy test workloads and apply a policy that enforces mTLS.
  • How to interpret the agent logs that show the authentication flow.
Prerequisites Enable encryption and authentication in Cilium Helm values Edit your Cilium values file (values.yaml) to enable transparent encryption and the authentication features. Example excerpts:
Spire must be reachable from Cilium agents for SPIFFE identity issuance and verification to succeed. Ensure network access, node selectors, tolerations, and resource constraints in your Helm values match your environment.
If you run a hardened cluster, adjust node selectors and tolerations for the Spire server and agents in the Helm values. Confirm the Cilium Helm chart version supports the spire integration for your Cilium release.
Install / upgrade Cilium with the updated values Apply the updated Helm values to Cilium:
Restart the operator and agent pods so the changed configuration takes effect:
Enable debug logging for authentication troubleshooting Enable Cilium debug logging to surface authentication events:
This updates the Cilium config, which will cause agent pods to restart and pick up debug logging. Verify Spire and Cilium resources are running Confirm that Spire and Cilium components are present and running:
Representative output (trimmed):
Check services:
Representative output:
Deploy a simple server and a client Create an NGINX server and a client (netshoot) to test connectivity and authentication. server-deployment-and-service.yaml
client-deployment.yaml
Apply the manifests:
Wait until pods are Ready:
Representative pod output: