apiVersion: v1 kind: Pod metadata: name: client namespace: istio-vt-t46 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: echo namespace: istio-vt-t46 labels: app: echo spec: replicas: 1 selector: matchLabels: app: echo template: metadata: labels: app: echo annotations: sidecar.istio.io/inject: "true" spec: containers: - name: echo image: mendhak/http-https-echo:37 env: - name: HTTP_PORT value: "8080" - name: HTTPS_PORT value: "8443" ports: - containerPort: 8080 - containerPort: 8443 --- apiVersion: v1 kind: Service metadata: name: echo namespace: istio-vt-t46 spec: selector: app: echo ports: - name: http port: 80 targetPort: 8080 - name: https port: 443 targetPort: 8443 --- apiVersion: v1 kind: ServiceAccount metadata: name: mutual-gw namespace: istio-vt-t46 --- apiVersion: apps/v1 kind: Deployment metadata: name: mutual-gw namespace: istio-vt-t46 spec: replicas: 1 selector: matchLabels: istio: mutual-gw-cert template: metadata: labels: istio: mutual-gw-cert annotations: inject.istio.io/templates: gateway sidecar.istio.io/inject: "true" spec: serviceAccountName: mutual-gw containers: - name: istio-proxy image: auto --- apiVersion: v1 kind: Service metadata: name: mutual-gw namespace: istio-vt-t46 spec: selector: istio: mutual-gw-cert ports: - name: tcp port: 9443 targetPort: 9443 --- apiVersion: networking.istio.io/v1 kind: Gateway metadata: name: mutual-gw namespace: istio-vt-t46 spec: selector: istio: mutual-gw-cert servers: - port: number: 9443 name: tls protocol: TLS tls: mode: ISTIO_MUTUAL hosts: - "*" --- apiVersion: networking.istio.io/v1 kind: VirtualService metadata: name: mutual-gw-route namespace: istio-vt-t46 spec: hosts: - "*" gateways: - mutual-gw tcp: - match: - port: 9443 route: - destination: host: echo.istio-vt-t46.svc.cluster.local port: number: 80 --- apiVersion: networking.istio.io/v1 kind: DestinationRule metadata: name: mutual-gw-dr namespace: istio-vt-t46 spec: host: mutual-gw.istio-vt-t46.svc.cluster.local trafficPolicy: tls: mode: ISTIO_MUTUAL --- apiVersion: v1 kind: Pod metadata: name: non-mesh-caller namespace: istio-vt-t46 labels: app: non-mesh-caller annotations: sidecar.istio.io/inject: "false" spec: containers: - name: curl image: curlimages/curl:8.14.1 command: ["sleep", "infinity"]