istio commands

19 commands, each with a one-line explanation. Click a command to copy it, or its title for details.

Commands 19 shown

  • istioctl install --set profile=demo -y

    Install Istio with the demo configuration profile

    service-mesh · install

  • kubectl label namespace default istio-injection=enabled

    Enable automatic Envoy sidecar injection for a namespace

    service-mesh · sidecar

  • istioctl proxy-status

    Get sync status of all Envoy proxies in the mesh

    service-mesh · proxy

  • istioctl analyze

    Analyze Istio configuration for potential issues

    service-mesh · analyze · debug

  • istioctl proxy-config all deploy/myapp

    Show complete Envoy proxy config for a deployment

    service-mesh · envoy · debug

  • kubectl apply -f virtualservice.yaml

    Apply a VirtualService to define traffic routing rules

    service-mesh · virtualservice · routing

  • kubectl apply -f destinationrule.yaml

    Apply a DestinationRule to define load balancing and circuit breaker policies

    service-mesh · destinationrule

  • kubectl apply -f - <<EOF apiVersion: security.istio.io/v1beta1 kind: PeerAuthentication metadata: name: default namespace: default spec: mtls: mode: STRICT EOF

    Enforce strict mutual TLS for all workloads in namespace

    service-mesh · mtls · security

  • istioctl kube-inject -f deployment.yaml | kubectl apply -f -

    Manually inject Istio sidecar into a deployment manifest

    service-mesh · sidecar · inject

  • istioctl dashboard kiali

    Open Kiali service mesh dashboard in browser

    service-mesh · kiali · dashboard

  • istioctl dashboard jaeger

    Open Jaeger distributed tracing dashboard

    service-mesh · jaeger · tracing

  • kubectl logs -l app=myapp -c istio-proxy | head -50

    View Envoy access logs from the sidecar container

    service-mesh · logs · envoy

  • # In VirtualService spec.http[].fault.delay

    Inject artificial delay to test resilience (in VirtualService)

    service-mesh · fault-injection · testing

  • # In VirtualService spec.http[].mirror

    Mirror traffic to a shadow service for testing

    service-mesh · mirroring · canary

  • istioctl uninstall --purge -y

    Completely remove Istio from the cluster

    service-mesh · uninstall

  • 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: 80 - destination: host: myapp subset: v2 weight: 20 EOF

    Route 80% traffic to v1, 20% to v2 (canary split)

    service-mesh · virtualservice · routing

  • 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

    Define subsets and circuit breaker (outlier detection)

    service-mesh · destinationrule

  • 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

    Inject 5s delay for 100% of requests to test resilience

    service-mesh · fault-injection · testing

  • 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

    Mirror 100% of traffic to v2 shadow service

    service-mesh · mirroring · canary