Skip to content

Commit 727c6e8

Browse files
Ivan PortaIvan Porta
authored andcommitted
create namespace and invert emojivoto deployment and trafficsplit
1 parent 8029b03 commit 727c6e8

File tree

7 files changed

+203
-140
lines changed

7 files changed

+203
-140
lines changed

linkerd.io/content/2-edge/tasks/automatic-failover.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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
10690
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
10791
if 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

111120
We can use the `linkerd viz stat` command to see that the `vote-bot` traffic

linkerd.io/content/2.11/tasks/automatic-failover.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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
10690
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
10791
if 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

111120
We can use the `linkerd viz stat` command to see that the `vote-bot` traffic

linkerd.io/content/2.12/tasks/automatic-failover.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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
10690
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
10791
if 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

111120
We can use the `linkerd viz stat` command to see that the `vote-bot` traffic

linkerd.io/content/2.13/tasks/automatic-failover.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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
10690
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
10791
if 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

111120
We can use the `linkerd viz stat` command to see that the `vote-bot` traffic

linkerd.io/content/2.14/tasks/automatic-failover.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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
10690
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
10791
if 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

111120
We can use the `linkerd viz stat` command to see that the `vote-bot` traffic

linkerd.io/content/2.15/tasks/automatic-failover.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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
10690
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
10791
if 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

111120
We can use the `linkerd viz stat` command to see that the `vote-bot` traffic

0 commit comments

Comments
 (0)