svilensabev / l2-k3d-multi

Example Linkerd multicluster with k3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linkerd2 Multi-Cluster Demo

This demo uses Linkerd's new multicluster functionality to demonstrate failover & traffic-splitting in a multi-cluster mesh of Kubernetes clusters.

./create.sh initializes a temporary CA and a set of clusters in k3d: dev, east, and west.

We can then install the app into the east and west clusters:

:; kubectl --context=k3d-east apply -k east
:; kubectl --context=k3d-west apply -k west

These clusters operate independently by default.

./link.sh configures linkerd-multicluster gateways & service mirrors on each cluster. east and west are configured to discover services from each other. dev is only configured run the web and vote-bot components, and it discovers other services from both east and west.

At this point, we can start our dev setup which uses the voting and emoji services in the east and west clusters:

:; kubectl --context=k3d-dev apply -k dev

We can also route traffic between the east and west clusters. See the commented sections in ./east/kustomization.yml and ./west/kustomization.yml. These configurations can be modified to reroute traffic between clusters!

About

Example Linkerd multicluster with k3d


Languages

Language:Shell 100.0%