Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
Scenario 01 - Considering microservice replication across multiple locations with replication within each cluster

Diagram

Image RemovedImage Added


Testing Steps

  1. Install ISTIO - Deploy istio control plane in each cluster. (NOTE - For testing use common root CA).  Reference
  2. Deploy the application is both the clusters as shown in the above figure. (NOTE - Make sure that the istio sidecars are injected to the Service pods)  For example use - server- httpbin, client - sleep
  3. Configure DNS - To provide resolution of service from remote clusters, istio uses its own DNS called istiocoredns which provides the resolution of remote istio services

...

4. Add Istio service entry with details of the remote servers  ( server service 03 and server service 04) to the cluster where the client is running (For ISTIO multi-cluster communication usage of SNI ports is mandatory at both ends on istio-ingressgateway)

...

Code Block
languageyml
themeEclipse
titleServiceEntryVirtualService
linenumberstrue
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: reviews-route
spec:
  hosts:
  - service01.bar.svc.cluster.local
  http:
    - match:
      - uri:
          prefix: "/headers"
      route:
      - destination:
          host: serviceserver04.bar.global
          port:
            number: 8000
        weight: 50
      - destination:
          host: serviceserver01.bar.svc.cluster.local
          port:
            number: 8000
        weight: 25
	  - destination:
          host: serviceserver02.bar.svc.cluster.local
          port:
            number: 8000
        weight: 25

...

Code Block
languagebash
titleTrafficdistribution
linenumberstrue
#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 10 ]; do
	curl -v service01.bar.svc.cluster.local/headers
	sleep 2
done


NOTE - Although the service running in an external cluster can be accessed by following the steps above, the failover mechanism is not yet supported by ISTIO (Replicated control plane).

For this scenario, the intent must have the following istio configurations


Cluster Istio configuration
cluster 01a. serviceEntry - of service serverservice04 as shown in step 4
b. virtualservice - having entries of serverservice04 (in cluster 02), serverservice01 (cluster 01) and serverservice02 (cluster 01) as shown in step 5
c. configmap - to add stubdomain .global in the coreDNS
d. destinationRule - for any restrictions/loadbalancing amongst internal services/hosts
cluster 02a. configmap - to add stubdomain .global in the coreDNS
b. destinationRule - for any restrictions/loadbalancing amongst internal services/hosts



IN PROGRESS......