Configure Istio Mutual TLS (mTLS) Authentication
Istio is installed in the cluster. Deployment target-app runs in namespace app-ns; client-pod runs in namespace client-ns.
The task
Task
Istio is installed in the cluster. Deployment target-app runs in namespace app-ns; client-pod runs in namespace client-ns.
Requirements
- Create a
PeerAuthenticationnamedtarget-mtlsin namespaceapp-nsthat requires STRICT mutual TLS for thetarget-appworkload (selectorapp: target-app) - Add a port-level exception so port
8080uses PERMISSIVE mode (allowing non-mTLS health/probe traffic) - Create an
AuthorizationPolicynamedallow-clientin namespaceapp-nsthat allows requests totarget-apponly from namespaceclient-ns
Verify that the workload requires mTLS, port 8080 is permissive, and only client-ns is authorized.
What this tests
Restrict RBAC and service accounts, tighten API server flags, and keep the cluster patched. On the CKS exam, Cluster Hardening tasks are graded purely on what you build in the cluster - not multiple choice - so the only way to get faster is to do them on a real cluster against a clock.
Practice it for real
prepium.sh drops you into your own isolated Kubernetes cluster in the browser - no install, no credit card. You solve the task in a real terminal, hit validate, and a programmatic checker scores exactly what you got right and wrong (with partial credit). The canonical solution unlocks after you attempt it, so you learn the fast, exam-ready way to do it.