alpha, beta, charlie, delta, and istio-system.
Quick navigation:
- Scenario 1 — Cross-namespace call failing with connection reset (mTLS / sidecar injection)
- Scenario 2 — Pod in an injection-enabled namespace is missing sidecar
- Scenario 3 — VirtualService routes to wrong host/port causing 503
- Scenario 4 — Gateway / External access issues (selector mismatch and missing gateway/hosts in VirtualService)
References:
Scenario 1 — Cross-namespace call failing with connection reset (mTLS / sidecar injection)
Symptom: A pod in namespacecharlie fails to curl helloworld in alpha and receives a connection reset:
- Check pods and services in
alpha:
- Check client pods in
charlie:
- Verify namespace labels for sidecar injection:
- Inspect global mTLS/PeerAuthentication:
- A global
PeerAuthenticationinSTRICTmode enforces mutual TLS. The client pod incharlielacked an Istio sidecar because thecharlienamespace was not labeled for injection, so it could not establish mTLS and the connection was reset.
- Use
istioctl analyzeto identify misconfigurations (recommended):
- Label the namespace for injection:
- Recreate the client pod so it receives an injected sidecar. Example if you have a manifest
charlie_curl.yaml:
- Confirm the pod is Running with both application and
istio-proxycontainers:
- Retry the curl:
Always verify both that the namespace has the
istio-injection=enabled label and that pods were recreated after labeling. Labeling a namespace does not retroactively inject sidecars into existing pods.Scenario 2 — Pod in an injection-enabled namespace is missing sidecar
Symptom: Inbeta, pods show 1/1 containers (no istio-proxy) even though the namespace has istio-injection=enabled.
Investigation steps
- Get pods and deployments in
betaand confirm namespace labels:
- Inspect the Deployment or Pod for annotations that may disable injection:
- The Deployment annotation
sidecar.istio.io/inject: "false"explicitly disables sidecar injection for those pods, overriding the namespace-level label.
- Edit the Deployment to remove or change the annotation to allow injection (remove or set it to
"true"), then recreate pods (rolling update or delete pods to let them be recreated).
istio-proxy:
Scenario 3 — VirtualService routes to wrong host/port causing 503 Service Unavailable
Symptom: Requests tohttpbin in delta return a 503 from Envoy:
- Validate the Service and Pods in
delta:
- Inspect the VirtualService for
httpbin:
- The VirtualService routes traffic to
httpbin.charlie.svc.cluster.local:5000, but the actual service ishttpbin.delta.svc.cluster.localon port8000. Envoy cannot find a valid upstream, resulting in 503.
- Edit the VirtualService to point to the correct host and port:
Service that backs the workloads and ensure VirtualService destinations match the service FQDN and port.
Scenario 4 — Gateway / External access issues (selector mismatch and missing gateway/hosts in VirtualService)
Symptom:helloworld in alpha is reachable internally but not via the configured Gateway/Ingress. External requests to the ingress IP return connection refused or 404.
Investigation steps
- Check the Ingress Gateway service for external IP or LoadBalancer:
- Inspect the Gateway resource in
alpha:
- Confirm labels on the ingress pods to determine the correct selector:
istio=ingressgateway or istio-ingressgateway. The Gateway.spec.selector must match the ingress pod labels exactly; otherwise the Gateway is not bound to any ingress workload and cannot accept traffic.
Fix for selector mismatch
- Edit the Gateway to match the actual label on the ingress pods:
Connection refused might change to 404 Not Found because the Gateway is now handled by the ingress but the VirtualService still doesn’t match external host/gateway configuration.
Problem #2 — VirtualService missing hosts and gateways for external routing
- Inspect the
helloworldVirtualService:
hello.kodekloud.com) and does not reference the Gateway (gateways), the Gateway will not route requests targeting the external hostname to this VirtualService, and Envoy will return 404.
Fix for VirtualService
- Edit the VirtualService to include both
gatewaysand the external host:
- Ensure the Gateway
spec.selectormatches the ingress pod labels. - Ensure the VirtualService includes
gateways:and the external host inhosts:. - Curl the ingress IP using the external host in the
Hostheader:
Notes and exam tips
- Use
istioctl analyzeto surface common issues around injection, Gateways, and VirtualServices. - Troubleshooting priority checklist:
- Validate Kubernetes
Serviceand Pod status. - Confirm namespace labels for sidecar injection.
- Inspect resource-specific configurations:
PeerAuthentication,DestinationRule,AuthorizationPolicy,VirtualService,Gateway, andService.
- Validate Kubernetes
- Common misconfiguration patterns: selector typos, wrong hostnames, incorrect namespaces, and wrong ports.
- For exams: apply the correct resource changes where necessary — partial corrections may still earn partial credit; avoid leaving answers blank.
When editing resources: after changing a namespace label or Deployment annotation related to sidecar injection, you must recreate the pods to get the sidecar injected. Labeling alone doesn’t modify existing pods.