Install Istio Multicluster Replicated Control Plane
Istio is a service mesh platform that can control and modify traffic policy behaviour in Kubernetes by injecting sidecar to a container. Multicluster Replicated Control Plane is an uses cases to enable communication between two service in two difference service meshes without using Ingress and can enable mutual TLS between the service.
Multicluster Replicated Control Plane allow your service to communicate each other with *.global FQDN between service mesh network. This tutorial is written because the original installation documentation is sucks lol (theory behind it is good).
Use minikube to start two kubernetes cluster named cluster1 and cluster2.
Notes: please adjust with your environment
Generate Certificate with step and step-ca
This will create root certificate, intermediate certificate, and certificate chain.
Add Kiali environment
Install Istio
Istioctl 1.4.9 use CRD named IstioControlPlane to create the cluster. We will use this CRD:
For Istio 1.5.4, use IstioOperator
IstioControlPlane change to IstioOperator in 1.5 release. This CRD install kiali and change ingressgateway into NodePort. please adjust with your environment. Save this file as istio.yaml.
Install Istio in Cluster1
Add cacerts certificate
Add kiali secret
Install Istio
Patch the coredns
This patch introduce a config to proxy *.global FQDN request from main coredns to istiocoredns.
Do the same thing with other kubernetes cluster.
Install Istio in cluster2
Add cacerts certificate
Add kiali secret
Install Istio
Patch the coredns
This patch introduce a config to proxy *.global FQDN request from main coredns to istiocoredns.
We have two Kubernetes cluster with istio enabled. This istio shared same root CA.
Mutual TLS Testing
Install httpbin service in Cluster2
Create namespace istio-testing and enable injection.
Apply httpbin deployment and service
Cluster1 will communicate to this service via httpbin.istio-testing.global FQDN. But how? please read the official documentation. I am to lazy to explain in here, just contact me if you still confuse about the concept.
Install sleep deployment and Istio ServiceEntry in Cluster1
ServiceEntry is a special object in Istio, this basically configure in istiocoredns to resolve httpbin.istio-testing.global into an unused ip 240.0.0.2 and force sidecar to forward the traffic into spesific endpoint (ingressgateway cluster2 with a special port 15443) and force mutual TLS.