skills/istio-ambient-mode/SKILL.md
Guide for installing, deploying, debugging, and cleaning up Istio's ambient mode mesh. Use when working with Istio ambient mode, ztunnel proxies, ambient mesh traffic redirection, istio-cni, HBONE encryption, Bookinfo sample application deployment, or istioctl commands for ambient profile setup and teardown.
npx skillsauth add peterj/skills istio-ambient-modeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Istio's ambient mode provides transparent mTLS encryption and routing for application traffic using ztunnel node proxies — without sidecars. Traffic is intercepted inside pod network namespaces via cooperation between istio-cni and ztunnel.
curl -L https://istio.io/downloadIstio | sh -
cd istio-*
export PATH=$PWD/bin:$PATH
istioctl install --set profile=ambient --skip-confirmation
Expected output:
✔ Istio core installed
✔ Istiod installed
✔ CNI installed
✔ Ztunnel installed
✔ Installation complete
Install the Gateway API CRDs before configuring traffic routing (required for ingress gateway).
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
kubectl apply -f samples/bookinfo/platform/kube/bookinfo-versions.yaml
kubectl get pods # Verify all pods are Running
kubectl apply -f samples/bookinfo/gateway-api/bookinfo-gateway.yaml
kubectl annotate gateway bookinfo-gateway networking.istio.io/service-type=ClusterIP --namespace=default
kubectl get gateway # Wait for PROGRAMMED=True
kubectl port-forward svc/bookinfo-gateway-istio 8080:80
# Open http://localhost:8080/productpage
istio-cni node agent: Responds to CNI events (pod creation/deletion) and watches the Kubernetes API for ambient label changes. Installs a chained CNI plugin and sets up iptables redirection rules inside pod network namespaces.istio-cni informs ztunnel over a Unix domain socket, passing a file descriptor for the pod's network namespace.| Direction | Port | Purpose | |-----------|------|---------| | Inbound plaintext (dst != 15008) | 15006 | Redirected to ztunnel plaintext listener | | Inbound HBONE (dst == 15008) | 15008 | Redirected to ztunnel HBONE listener | | Outbound TCP | 15001 | Redirected to ztunnel for egress, sent via HBONE encapsulation |
Run bash scripts/debug-ambient.sh to perform all three checks below, or run them manually:
kubectl logs ds/ztunnel -n istio-system | grep inpod
Look for:
inpod_enabled: truepod ... received netns, starting proxykubectl debug $(kubectl get pod -l app=<APP_LABEL> -n <NAMESPACE> -o jsonpath='{.items[0].metadata.name}') \
-it -n <NAMESPACE> --image nicolaka/netshoot -- ss -ntlp
Expect ports 15001, 15006, and 15008 in LISTEN state.
kubectl debug $(kubectl get pod -l app=<APP_LABEL> -n <NAMESPACE> -o jsonpath='{.items[0].metadata.name}') \
-it --image gcr.io/istio-release/base --profile=netadmin -n <NAMESPACE> -- iptables-save
Expect ISTIO_PRERT and ISTIO_OUTPUT chains in mangle and nat tables with TPROXY/REDIRECT rules.
Order matters: remove workloads from ambient data plane before uninstalling Istio.
# 1. Remove waypoint proxies
kubectl label namespace default istio.io/use-waypoint-
istioctl waypoint delete --all
# 2. Remove namespace from ambient data plane
kubectl label namespace default istio.io/dataplane-mode-
# 3. Remove sample application
kubectl delete httproute reviews
kubectl delete authorizationpolicy productpage-viewer
kubectl delete -f samples/curl/curl.yaml
kubectl delete -f samples/bookinfo/platform/kube/bookinfo.yaml
kubectl delete -f samples/bookinfo/platform/kube/bookinfo-versions.yaml
kubectl delete -f samples/bookinfo/gateway-api/bookinfo-gateway.yaml
# 4. Uninstall Istio
istioctl uninstall -y --purge
kubectl delete namespace istio-system
# 5. Remove Gateway API CRDs (if installed)
bash scripts/debug-ambient.sh <APP_LABEL> <NAMESPACE> to check ztunnel logs, listening sockets, and iptables rules for a poddevelopment
Guide for installing, configuring, and deploying SPIRE servers and agents. Use when working with SPIRE, SPIFFE, workload identity, trust domains, node attestation, workload attestation, service identity, or X.509/JWT SVIDs on Kubernetes or Linux.
development
Diagnoses and resolves common Istio service mesh problems across traffic management, security, observability, and upgrades. Use when debugging Istio networking issues (503 errors, route rules not working, TLS mismatches, gateway 404s), security problems (authorization policies, mTLS, JWT authentication), observability gaps (missing traces, Grafana output issues), EnvoyFilter breakage, or when upgrading Istio and migrating from EnvoyFilter to first-class APIs.
tools
Configures Istio traffic management including multicluster traffic control, gateway network topology (XFF/XFCC headers, PROXY protocol), protocol selection, and TLS configuration. Use when working with Istio service mesh traffic routing, multicluster setups, gateway configuration, protocol detection, mTLS settings, or when troubleshooting TLS/proxy header issues.
development
Configures PagerDuty v1 and v2 notification services for Argo CD. Use when setting up PagerDuty incident creation or event triggering from Argo CD notifications, including secrets, ConfigMaps, templates, and annotations for PagerDuty integrations.