@@ -48,29 +48,13 @@ them in that cluster:
4848> helm --kube-context=west install linkerd-failover -n linkerd-failover --create-namespace --devel linkerd-edge/linkerd-failover
4949```
5050
51- ## Installing and Exporting Emojivoto
51+ ## Create the emojivoto namespace
5252
53- We'll now install the Emojivoto example application into both clusters:
53+ First, we need to create the namespace where we will deploy our application and the ` TrafficSplit ` resource.
5454
55- ``` bash
56- > linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
57- > linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
5855```
59-
60- Next we'll "export" the ` web-svc ` in the east cluster by setting the
61- ` mirror.linkerd.io/exported=true ` label. This will instruct the
62- multicluster extension to create a mirror service called ` web-svc-east ` in the
63- west cluster, making the east Emojivoto application available in the west
64- cluster:
65-
66- ``` bash
67- > kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
68- > kubectl --context=west -n emojivoto get svc
69- NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
70- emoji-svc ClusterIP 10.96.41.137 < none> 8080/TCP,8801/TCP 13m
71- voting-svc ClusterIP 10.96.247.68 < none> 8080/TCP,8801/TCP 13m
72- web-svc ClusterIP 10.96.222.169 < none> 80/TCP 13m
73- web-svc-east ClusterIP 10.96.244.245 < none> 80/TCP 92s
56+ > kubectl --context=west create ns emojivoto
57+ > kubectl --context=east create ns emojivoto
7458```
7559
7660## Creating the Failover TrafficSplit
@@ -106,6 +90,31 @@ This TrafficSplit indicates that the local (west) `web-svc` should be used as
10690the primary, but traffic should be shifted to the remote (east) ` web-svc-east `
10791if the primary becomes unavailable.
10892
93+ ## Installing and Exporting Emojivoto
94+
95+ We'll now install the Emojivoto example application into both clusters:
96+
97+ ``` bash
98+ > linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
99+ > linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
100+ ```
101+
102+ Next we'll "export" the ` web-svc ` in the east cluster by setting the
103+ ` mirror.linkerd.io/exported=true ` label. This will instruct the
104+ multicluster extension to create a mirror service called ` web-svc-east ` in the
105+ west cluster, making the east Emojivoto application available in the west
106+ cluster:
107+
108+ ``` bash
109+ > kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
110+ > kubectl --context=west -n emojivoto get svc
111+ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
112+ emoji-svc ClusterIP 10.96.41.137 < none> 8080/TCP,8801/TCP 13m
113+ voting-svc ClusterIP 10.96.247.68 < none> 8080/TCP,8801/TCP 13m
114+ web-svc ClusterIP 10.96.222.169 < none> 80/TCP 13m
115+ web-svc-east ClusterIP 10.96.244.245 < none> 80/TCP 92s
116+ ```
117+
109118## Testing the Failover
110119
111120We can use the ` linkerd viz stat ` command to see that the ` vote-bot ` traffic
0 commit comments