Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert order TrafficSplit and Emojivoto App #1908

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 29 additions & 20 deletions linkerd.io/content/2-edge/tasks/automatic-failover.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,13 @@ them in that cluster:
> helm --kube-context=west install linkerd-failover -n linkerd-failover --create-namespace --devel linkerd-edge/linkerd-failover
```

## Installing and Exporting Emojivoto
## Create the emojivoto namespace

We'll now install the Emojivoto example application into both clusters:
First, we need to create the namespace where we will deploy our application and the `TrafficSplit` resource.

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
> kubectl --context=west create ns emojivoto
> kubectl --context=east create ns emojivoto
```

## Creating the Failover TrafficSplit
Expand Down Expand Up @@ -106,6 +90,31 @@ This TrafficSplit indicates that the local (west) `web-svc` should be used as
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
if the primary becomes unavailable.

## Installing and Exporting Emojivoto

We'll now install the Emojivoto example application into both clusters:

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
```

## Testing the Failover

We can use the `linkerd viz stat` command to see that the `vote-bot` traffic
Expand Down
49 changes: 29 additions & 20 deletions linkerd.io/content/2.11/tasks/automatic-failover.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,13 @@ them in that cluster:
> helm --kube-context=west install linkerd-failover -n linkerd-failover --create-namespace --devel linkerd-edge/linkerd-failover
```

## Installing and Exporting Emojivoto
## Create the emojivoto namespace

We'll now install the Emojivoto example application into both clusters:
First, we need to create the namespace where we will deploy our application and the `TrafficSplit` resource.

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
> kubectl --context=west create ns emojivoto
> kubectl --context=east create ns emojivoto
```

## Creating the Failover TrafficSplit
Expand Down Expand Up @@ -106,6 +90,31 @@ This TrafficSplit indicates that the local (west) `web-svc` should be used as
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
if the primary becomes unavailable.

## Installing and Exporting Emojivoto

We'll now install the Emojivoto example application into both clusters:

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
```

## Testing the Failover

We can use the `linkerd viz stat` command to see that the `vote-bot` traffic
Expand Down
49 changes: 29 additions & 20 deletions linkerd.io/content/2.12/tasks/automatic-failover.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,13 @@ them in that cluster:
> helm --kube-context=west install linkerd-failover -n linkerd-failover --create-namespace --devel linkerd-edge/linkerd-failover
```

## Installing and Exporting Emojivoto
## Create the emojivoto namespace

We'll now install the Emojivoto example application into both clusters:
First, we need to create the namespace where we will deploy our application and the `TrafficSplit` resource.

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
> kubectl --context=west create ns emojivoto
> kubectl --context=east create ns emojivoto
```

## Creating the Failover TrafficSplit
Expand Down Expand Up @@ -106,6 +90,31 @@ This TrafficSplit indicates that the local (west) `web-svc` should be used as
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
if the primary becomes unavailable.

## Installing and Exporting Emojivoto

We'll now install the Emojivoto example application into both clusters:

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
```

## Testing the Failover

We can use the `linkerd viz stat` command to see that the `vote-bot` traffic
Expand Down
49 changes: 29 additions & 20 deletions linkerd.io/content/2.13/tasks/automatic-failover.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,13 @@ them in that cluster:
> helm --kube-context=west install linkerd-failover -n linkerd-failover --create-namespace --devel linkerd-edge/linkerd-failover
```

## Installing and Exporting Emojivoto
## Create the emojivoto namespace

We'll now install the Emojivoto example application into both clusters:
First, we need to create the namespace where we will deploy our application and the `TrafficSplit` resource.

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
> kubectl --context=west create ns emojivoto
> kubectl --context=east create ns emojivoto
```

## Creating the Failover TrafficSplit
Expand Down Expand Up @@ -106,6 +90,31 @@ This TrafficSplit indicates that the local (west) `web-svc` should be used as
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
if the primary becomes unavailable.

## Installing and Exporting Emojivoto

We'll now install the Emojivoto example application into both clusters:

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
```

## Testing the Failover

We can use the `linkerd viz stat` command to see that the `vote-bot` traffic
Expand Down
49 changes: 29 additions & 20 deletions linkerd.io/content/2.14/tasks/automatic-failover.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,13 @@ them in that cluster:
> helm --kube-context=west install linkerd-failover -n linkerd-failover --create-namespace --devel linkerd-edge/linkerd-failover
```

## Installing and Exporting Emojivoto
## Create the emojivoto namespace

We'll now install the Emojivoto example application into both clusters:
First, we need to create the namespace where we will deploy our application and the `TrafficSplit` resource.

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
> kubectl --context=west create ns emojivoto
> kubectl --context=east create ns emojivoto
```

## Creating the Failover TrafficSplit
Expand Down Expand Up @@ -106,6 +90,31 @@ This TrafficSplit indicates that the local (west) `web-svc` should be used as
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
if the primary becomes unavailable.

## Installing and Exporting Emojivoto

We'll now install the Emojivoto example application into both clusters:

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
```

## Testing the Failover

We can use the `linkerd viz stat` command to see that the `vote-bot` traffic
Expand Down
49 changes: 29 additions & 20 deletions linkerd.io/content/2.15/tasks/automatic-failover.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,13 @@ them in that cluster:
> helm --kube-context=west install linkerd-failover -n linkerd-failover --create-namespace --devel linkerd-edge/linkerd-failover
```

## Installing and Exporting Emojivoto
## Create the emojivoto namespace

We'll now install the Emojivoto example application into both clusters:
First, we need to create the namespace where we will deploy our application and the `TrafficSplit` resource.

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
> kubectl --context=west create ns emojivoto
> kubectl --context=east create ns emojivoto
```

## Creating the Failover TrafficSplit
Expand Down Expand Up @@ -106,6 +90,31 @@ This TrafficSplit indicates that the local (west) `web-svc` should be used as
the primary, but traffic should be shifted to the remote (east) `web-svc-east`
if the primary becomes unavailable.

## Installing and Exporting Emojivoto

We'll now install the Emojivoto example application into both clusters:

```bash
> linkerd --context=west inject https://run.linkerd.io/emojivoto.yml | kubectl --context=west apply -f -
> linkerd --context=east inject https://run.linkerd.io/emojivoto.yml | kubectl --context=east apply -f -
```

Next we'll "export" the `web-svc` in the east cluster by setting the
`mirror.linkerd.io/exported=true` label. This will instruct the
multicluster extension to create a mirror service called `web-svc-east` in the
west cluster, making the east Emojivoto application available in the west
cluster:

```bash
> kubectl --context=east -n emojivoto label svc/web-svc mirror.linkerd.io/exported=true
> kubectl --context=west -n emojivoto get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
emoji-svc ClusterIP 10.96.41.137 <none> 8080/TCP,8801/TCP 13m
voting-svc ClusterIP 10.96.247.68 <none> 8080/TCP,8801/TCP 13m
web-svc ClusterIP 10.96.222.169 <none> 80/TCP 13m
web-svc-east ClusterIP 10.96.244.245 <none> 80/TCP 92s
```

## Testing the Failover

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