apiVersion: v1 kind: Pod metadata: name: client namespace: istio-vt-t54 labels: app: client annotations: sidecar.istio.io/inject: "true" spec: containers: - name: curl image: curlimages/curl:8.14.1 command: ["sleep", "infinity"] --- apiVersion: apps/v1 kind: Deployment metadata: name: multidr-echo-v1 namespace: istio-vt-t54 labels: app: multidr-echo version: v1 spec: replicas: 1 selector: matchLabels: app: multidr-echo version: v1 template: metadata: labels: app: multidr-echo version: v1 annotations: sidecar.istio.io/inject: "true" spec: containers: - name: echo image: hashicorp/http-echo:0.2.3 args: ["-text=v1-ok", "-listen=:5678"] ports: - containerPort: 5678 --- apiVersion: apps/v1 kind: Deployment metadata: name: multidr-echo-v2 namespace: istio-vt-t54 labels: app: multidr-echo version: v2 spec: replicas: 1 selector: matchLabels: app: multidr-echo version: v2 template: metadata: labels: app: multidr-echo version: v2 annotations: sidecar.istio.io/inject: "true" spec: containers: - name: echo image: hashicorp/http-echo:0.2.3 args: ["-text=v2-ok", "-listen=:5678"] ports: - containerPort: 5678 --- apiVersion: v1 kind: Service metadata: name: multidr-echo namespace: istio-vt-t54 spec: selector: app: multidr-echo ports: - name: http port: 80 targetPort: 5678 --- apiVersion: networking.istio.io/v1 kind: DestinationRule metadata: name: multidr-first namespace: istio-vt-t54 spec: # NOTE: host uses .svc.cluster.local, NOT .svc.homelab.local, even though this # cluster's real k8s DNS domain is homelab.local. Istio's internal service # registry hostname (istiod --domain / global.proxy.clusterDomain) is installed # as "cluster.local" on this cluster independent of kubelet's clusterDomain, so # DestinationRule/VirtualService "host" fields must match .svc.cluster.local to # actually attach to the real Envoy cluster. Confirmed via: # istioctl proxy-config cluster (no filter) -> lists *.svc.cluster.local # istiod deploy args contain: --domain cluster.local host: multidr-echo.istio-vt-t54.svc.cluster.local trafficPolicy: connectionPool: tcp: maxConnections: 11 subsets: - name: v1 labels: version: v1