- Deploying a Hello World application.
- Enforcing peer authentication (mTLS) globally.
- Observing how non-Istio workloads are affected when mTLS is required.
- Enabling sidecar injection to allow pods to communicate using mTLS.
Verify namespace sidecar injection
Confirm thedefault namespace has Istio sidecar injection enabled:
Deploy the Hello World application
Apply your Hello World manifests (Deployment + Service). Verify the pods indefault namespace are running and have two containers (app + Envoy sidecar):
Create a test namespace and run a plain (non-Istio) pod
Create a new namespacetest and run an NGINX pod without sidecar injection:
test pod (which is NOT Istio-injected), curl the Hello World service in default. Plaintext traffic is permitted by default, so this should succeed:
Enforce mTLS cluster-wide using PeerAuthentication
By default, Istio does not enforce mTLS mesh-wide. To require mTLS for all cluster traffic, create a globalPeerAuthentication resource in the istio-system namespace with STRICT mode.
Create peer_auth_global.yaml:
Observe effect: non-injected pod cannot communicate
After enabling strict mTLS globally, the non-injectedtest pod (no Envoy sidecar) cannot perform TLS-mutual communication and will be rejected.
Retry the curl from the test pod:
PeerAuthentication requires mTLS, but the test pod does not have an Envoy sidecar and cannot speak mTLS.
Enable sidecar injection for the test namespace and recreate the pod
Useistioctl analyze to get a recommendation (it will point out that test is not injection-enabled):
test pod so it receives an Envoy proxy:
test pod has two containers (app + Envoy sidecar) and can perform mTLS to the helloworld service.
Verify successful mTLS communication
Retry the curl; Envoy now handles mTLS and returns a successful HTTP response:Quick reference: common commands and resources
Note: when you put JSON or objects in tables, wrap them in backticks, e.g.
[{ "object": "person" }].
Enabling
istio-injection=enabled on a namespace does not retroactively inject sidecars into existing pods — delete and recreate pods to pick up the Envoy sidecar. Also ensure the PeerAuthentication API version (security.istio.io/v1beta1) matches your Istio control-plane version; this is commonly used in recent Istio releases.