<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Travels Demo - Multicluster on Kiali</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/</link><description>Recent content in Travels Demo - Multicluster on Kiali</description><generator>Hugo</generator><language>en</language><atom:link href="https://staging--kiali.netlify.app/docs/tutorials/multicluster/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/01-introduction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/01-introduction/</guid><description>&lt;p&gt;So far, we know how good Kiali can be to understand applications, their relationships with each other and with external applications.&lt;/p&gt;&#10;&lt;p&gt;In the previous tutorial, Kiali was setup to observe just a single cluster. Now, we will expand its capabilities to observe more than one cluster. The extra clusters are remotes, meaning that there is not a control plane on them, they only have user applications.&lt;/p&gt;&#10;&lt;p&gt;This topology is called &lt;a href="https://istio.io/latest/docs/setup/install/multicluster/primary-remote/"&gt;primary-remote&lt;/a&gt; and it is very useful to spread applications into different clusters having just one primary cluster, which is where Istio and Kiali are installed.&lt;/p&gt;</description></item><item><title>Prerequisites</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/02-prerequisites/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/02-prerequisites/</guid><description>&lt;p&gt;This tutorial is a walkthrough guide to install everything. For this reason, we will need:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;minikube&lt;/li&gt;&#10;&lt;li&gt;istioctl&lt;/li&gt;&#10;&lt;li&gt;helm&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This tutorial was tested on:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Minikube v1.30.1&lt;/li&gt;&#10;&lt;li&gt;Istio v1.18.1&lt;/li&gt;&#10;&lt;li&gt;Kiali v1.70&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Clusters are provided by minikube instances, but this tutorial should work on on any Kubernetes environment.&lt;/p&gt;&#10;&lt;p&gt;We will set up some environment variables for the following commands:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;CLUSTER_EAST=&amp;#34;east&amp;#34;&#10;CLUSTER_WEST=&amp;#34;west&amp;#34;&#10;ISTIO_DIR=&amp;#34;absolute-path-to-istio-folder&amp;#34;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As Istio will be installed on more than one cluster and needs to communicate between clusters, we need to create certificates for the Istio installation. We will follow the &lt;a href="https://istio.io/latest/docs/tasks/security/cert-management/plugin-ca-cert/"&gt;Istio documentation related to certificates&lt;/a&gt; to achieve this:&lt;/p&gt;</description></item><item><title>Deploy East cluster</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/03-deploy-east-cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/03-deploy-east-cluster/</guid><description>&lt;p&gt;Run the following commands to deploy the first cluster:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;minikube start -p $CLUSTER_EAST --network istio --memory 8g --cpus 4&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For both clusters, we need to configure MetalLB, which is a load balancer. This is because we need to assign an external IP to the required ingress gateways to enable cross cluster communication between Istio and the applications installed.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;minikube addons enable metallb -p $CLUSTER_EAST&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We set up some environment variables with IP ranges that MetalLB will then assign to the services:&lt;/p&gt;</description></item><item><title>Install Istio on East cluster</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/04-install-istio-east-cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/04-install-istio-east-cluster/</guid><description>&lt;p&gt;The east cluster is the primary one, consequently is where the istiod process will be installed alongside other applications like Kiali.&lt;/p&gt;&#10;&lt;p&gt;Run the following commands to install Istio:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;kubectl create namespace istio-system --context $CLUSTER_EAST&#10;&#10;kubectl create secret generic cacerts -n istio-system --context $CLUSTER_EAST \&#10; --from-file=certs/$CLUSTER_EAST/ca-cert.pem \&#10; --from-file=certs/$CLUSTER_EAST/ca-key.pem \&#10; --from-file=certs/$CLUSTER_EAST/root-cert.pem \&#10; --from-file=certs/$CLUSTER_EAST/cert-chain.pem&#10;&#10;kubectl --context=$CLUSTER_EAST label namespace istio-system topology.istio.io/network=network1&#10;&#10;cat &amp;lt;&amp;lt;EOF &amp;gt; $CLUSTER_EAST.yaml&#10;apiVersion: install.istio.io/v1alpha1&#10;kind: IstioOperator&#10;spec:&#10; values:&#10; global:&#10; meshID: mesh1&#10; multiCluster:&#10; clusterName: $CLUSTER_EAST&#10; network: network1&#10;EOF&#10;&#10;istioctl install -y --set values.pilot.env.EXTERNAL_ISTIOD=true --context=$CLUSTER_EAST -f $CLUSTER_EAST.yaml&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the installation, we need to create what we called an “east-west” gateway. It’s an ingress gateway just for the cross cluster configuration as we are opting to use the installation for different networks (this will be the case in the majority of the production scenarios).&lt;/p&gt;</description></item><item><title>Install Kiali</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/05-install-kiali/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/05-install-kiali/</guid><description>&lt;p&gt;Run the following command to install Kiali using the Kiali operator:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;kubectl config use-context $CLUSTER_EAST&#10;&#10;helm upgrade --install --namespace istio-system --set auth.strategy=anonymous --set deployment.logger.log_level=debug --set deployment.ingress.enabled=true --repo https://kiali.org/helm-charts kiali-server kiali-server &#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Verify that Kiali is running with the following command:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;istioctl dashboard kiali&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There are other alternatives to expose Kiali or other Addons in Istio. Check &lt;a href="https://istio.io/latest/docs/tasks/observability/gateways/"&gt;Remotely Accessing Telemetry Addons for more information&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Install Travels on East cluster</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/06-install-travels-east-cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/06-install-travels-east-cluster/</guid><description>&lt;p&gt;Run the following commands to install Travels application on east cluster:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;kubectl create namespace travel-agency --context $CLUSTER_EAST&#10;kubectl create namespace travel-portal --context $CLUSTER_EAST&#10;kubectl create namespace travel-control --context $CLUSTER_EAST&#10;&#10;kubectl label namespace travel-agency istio-injection=enabled --context $CLUSTER_EAST&#10;kubectl label namespace travel-portal istio-injection=enabled --context $CLUSTER_EAST&#10;kubectl label namespace travel-control istio-injection=enabled --context $CLUSTER_EAST&#10;&#10;kubectl apply -f &amp;lt;(curl -L https://raw.githubusercontent.com/kiali/demos/master/travels/travel_agency.yaml) -n travel-agency --context $CLUSTER_EAST&#10;kubectl apply -f &amp;lt;(curl -L https://raw.githubusercontent.com/kiali/demos/master/travels/travel_portal.yaml) -n travel-portal --context $CLUSTER_EAST&#10;kubectl apply -f &amp;lt;(curl -L https://raw.githubusercontent.com/kiali/demos/master/travels/travel_control.yaml) -n travel-control --context $CLUSTER_EAST&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the installation, we can see that the Travels application is running on the east cluster:&lt;/p&gt;</description></item><item><title>Deploy West cluster</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/07-deploy-west-cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/07-deploy-west-cluster/</guid><description>&lt;p&gt;Run the following commands to deploy the second cluster:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;minikube start -p $CLUSTER_WEST --network istio --memory 8g --cpus 4&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Similar to the east cluster, we configure MetalLB:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;minikube addons enable metallb -p $CLUSTER_WEST&#10;&#10;MINIKUBE_IP=$(minikube ip -p $CLUSTER_WEST)&#10;MINIKUBE_IP_NETWORK=$(echo $MINIKUBE_IP | sed -E &amp;#39;s/([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+/\1/&amp;#39;)&#10;MINIKUBE_LB_RANGE=&amp;#34;${MINIKUBE_IP_NETWORK}.30-${MINIKUBE_IP_NETWORK}.39&amp;#34;&#10;&#10;cat &amp;lt;&amp;lt;EOF | kubectl --context $CLUSTER_WEST apply -f -&#10;apiVersion: v1&#10;kind: ConfigMap&#10;metadata:&#10; namespace: metallb-system&#10; name: config&#10;data:&#10; config: |&#10; address-pools:&#10; - name: default&#10; protocol: layer2&#10; addresses: [${MINIKUBE_LB_RANGE}]&#10;EOF&#10;&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>Install Istio on West cluster</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/08-install-istio-west-cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/08-install-istio-west-cluster/</guid><description>&lt;p&gt;This installation will be different as this cluster will be a remote. In a remote cluster, it won&amp;rsquo;t be an Istio control plane. Istio will install some resources that allows the primary control plane to configure the workloads in the remote cluster like injecting the sidecars and configuring the low level routing.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;kubectl create namespace istio-system --context $CLUSTER_WEST&#10;&#10;kubectl create secret generic cacerts -n istio-system --context $CLUSTER_WEST \&#10; --from-file=certs/$CLUSTER_WEST/ca-cert.pem \&#10; --from-file=certs/$CLUSTER_WEST/ca-key.pem \&#10; --from-file=certs/$CLUSTER_WEST/root-cert.pem \&#10; --from-file=certs/$CLUSTER_WEST/cert-chain.pem&#10;&#10;kubectl --context=$CLUSTER_WEST annotate namespace istio-system topology.istio.io/controlPlaneClusters=$CLUSTER_EAST&#10;kubectl --context=$CLUSTER_WEST label namespace istio-system topology.istio.io/network=network2&#10;&#10;cat &amp;lt;&amp;lt;EOF &amp;gt; $CLUSTER_WEST.yaml&#10;apiVersion: install.istio.io/v1alpha1&#10;kind: IstioOperator&#10;spec:&#10; profile: remote&#10; values:&#10; istiodRemote:&#10; injectionPath: /inject/cluster/$CLUSTER_WEST/net/network2&#10; global:&#10; remotePilotAddress: ${DISCOVERY_ADDRESS}&#10;EOF&#10;&#10;istioctl install -y --context=$CLUSTER_WEST -f $CLUSTER_WEST.yaml&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We will also install a Prometheus instance on the remote. We will federate both Prometheus, with the east&amp;rsquo;s one being the place where all metrics will be gathered together:&lt;/p&gt;</description></item><item><title>Configure Kiali for multicluster</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/09-configure-kiali/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/09-configure-kiali/</guid><description>&lt;p&gt;We will configure Kiali to access the remote cluster. This will require a secret (similar to the Istio secret) containing the credentials for Kiali to fetch information from the remote cluster:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;curl -L -o kiali-prepare-remote-cluster.sh https://raw.githubusercontent.com/kiali/kiali/master/hack/istio/multicluster/kiali-prepare-remote-cluster.sh&#10;&#10;chmod +x kiali-prepare-remote-cluster.sh&#10;&#10;./kiali-prepare-remote-cluster.sh --kiali-cluster-context $CLUSTER_EAST --remote-cluster-context $CLUSTER_WEST&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Finally, upgrade the installation for Kiali to pick up the secret:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;kubectl config use-context $CLUSTER_EAST&#10;&#10;helm upgrade --install --namespace istio-system --set auth.strategy=anonymous --set deployment.logger.log_level=debug --set deployment.ingress.enabled=true --repo https://kiali.org/helm-charts kiali-server kiali-server&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As result, we can quickly see that a new namespace appear in the Overview, the istio-system namespace from west cluster:&lt;/p&gt;</description></item><item><title>Install Travels on West cluster</title><link>https://staging--kiali.netlify.app/docs/tutorials/multicluster/10-install-travels-west-cluster-copy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://staging--kiali.netlify.app/docs/tutorials/multicluster/10-install-travels-west-cluster-copy/</guid><description>&lt;p&gt;We are going to deploy two new services just to distribute traffic on the new cluster. These services are travels v2 and v3:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;kubectl create ns travel-agency --context $CLUSTER_WEST&#10;&#10;kubectl label namespace travel-agency istio-injection=enabled --context $CLUSTER_WEST&#10;&#10;kubectl apply -f &amp;lt;(curl -L https://raw.githubusercontent.com/kiali/demos/master/travels/travels-v2.yaml) -n travel-agency --context $CLUSTER_WEST&#10;kubectl apply -f &amp;lt;(curl -L https://raw.githubusercontent.com/kiali/demos/master/travels/travels-v3.yaml) -n travel-agency --context $CLUSTER_WEST&#10;&#10;cat &amp;lt;&amp;lt;EOF | kubectl -n travel-agency --context $CLUSTER_WEST apply -f -&#10;apiVersion: v1&#10;kind: Service&#10;metadata:&#10; name: travels&#10; labels:&#10; app: travels&#10;spec:&#10; ports:&#10; - name: http&#10; port: 8000&#10; selector:&#10; app: travels&#10;---&#10;apiVersion: v1&#10;kind: Service&#10;metadata:&#10; name: insurances&#10; labels:&#10; app: insurances&#10;spec:&#10; ports:&#10; - name: http&#10; port: 8000&#10; selector:&#10; app: insurances&#10;---&#10;apiVersion: v1&#10;kind: Service&#10;metadata:&#10; name: hotels&#10; labels:&#10; app: hotels&#10;spec:&#10; ports:&#10; - name: http&#10; port: 8000&#10; selector:&#10; app: hotels&#10;---&#10;apiVersion: v1&#10;kind: Service&#10;metadata:&#10; name: flights&#10; labels:&#10; app: flights&#10;spec:&#10; ports:&#10; - name: http&#10; port: 8000&#10; selector:&#10; app: flights&#10;---&#10;apiVersion: v1&#10;kind: Service&#10;metadata:&#10; name: discounts&#10; labels:&#10; app: discounts&#10;spec:&#10; ports:&#10; - name: http&#10; port: 8000&#10; selector:&#10; app: discounts&#10;---&#10;apiVersion: v1&#10;kind: Service&#10;metadata:&#10; name: cars&#10; labels:&#10; app: cars&#10;spec:&#10; ports:&#10; - name: http&#10; port: 8000&#10; selector:&#10; app: cars&#10;EOF&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the installation, we can see that traffic is flowing to the remote cluster too:&lt;/p&gt;</description></item></channel></rss>