Set up a DestinationRule

Define v1 and v2 subsets and a circuit breaker with outlier detection

kubectl apply -f - <<EOF apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: myapp spec: host: myapp trafficPolicy: outlierDetection: consecutive5xxErrors: 5 interval: 10s baseEjectionTime: 30s subsets: - name: v1 labels: version: v1 - name: v2 labels: version: v2 EOF

tool
istio19 commands
tags
istioservice-meshdestinationrule

More istio commands

  • 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

    Add a 5s delay to 100% of requests to test how the app handles slow calls

  • 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

    Copy 100% of traffic to the v2 shadow service while users still get v1

  • istioctl install --set profile=demo -y

    Install Istio with the demo configuration profile

  • kubectl label namespace default istio-injection=enabled

    Add the Envoy sidecar to every new pod in the namespace automatically

  • istioctl proxy-status

    Show the sync status of all Envoy proxies in the mesh

all 19 istio commands