Fault injection — delay istio
Inject 5s delay for 100% of requests to test resilience
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: myapp
spec:
hosts:
- myapp
http:
- fault:
delay:
percentage:
value: 100
fixedDelay: 5s
route:
- destination:
host: myapp
EOF
more istio
all 19 commands →
Traffic mirroring
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: myapp
spec:
hosts:
- myapp
http:
- route:
- destination:
host: myapp
subset: v1
weight: 100
mirror:
host: myapp
subset: v2
mirrorPercentage:
value: 100
EOF
Install Istio (demo profile)
istioctl install --set profile=demo -y
Enable sidecar injection
kubectl label namespace default istio-injection=enabled
Check proxy status
istioctl proxy-status
Analyze config
istioctl analyze