mirror of https://github.com/hashicorp/consul
Update website/content/docs/connect/cluster-peering/k8s.mdx
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>pull/14126/head
parent
3286a60a5f
commit
15bd40ffc2
|
@ -238,12 +238,31 @@ To confirm that you deleted your peering connection, in `cluster-01`, query the
|
|||
$ curl "localhost:8500/v1/health/connect/backend?peer=cluster-02"
|
||||
```
|
||||
|
||||
## Recreate/Reset a peering connection
|
||||
## Recreate or reset a peering connection
|
||||
|
||||
To recreate or reset the peering connection, a new peering token needs to be generated on the cluster where the `PeeringAcceptor` was created, which in this case is `cluster-01`.
|
||||
To recreate or reset the peering connection, you need to generate a new peering token on the cluster where you created the `PeeringAcceptor` (in this example, `cluster-01`).
|
||||
|
||||
This can be performed by creating/updating the annotation `consul.hashicorp.com/peering-version` on the `PeeringAcceptor`. If the annotation already exists, update its value to a version that is higher.
|
||||
1. You can do this by creating or updating the annotation `consul.hashicorp.com/peering-version` on the `PeeringAcceptor`. If the annotation already exists, update its value to a version that is higher.
|
||||
|
||||
Once the above is done, repeat the steps in the peering process from saving your peering token so that you can export it to the other cluster. This will re-establish peering with the updated token.
|
||||
<CodeBlockConfig filename="acceptor.yml">
|
||||
|
||||
-> **NOTE:** A new peering token is only generated upon manually setting and updating the value of the annotation `consul.hashicorp.com/peering-version`. Creating a new token will cause the previous token to expire.
|
||||
```yaml
|
||||
apiVersion: consul.hashicorp.com/v1alpha1
|
||||
kind: PeeringAcceptor
|
||||
metadata:
|
||||
name: cluster-02
|
||||
annotations:
|
||||
consul.hashicorp.com/peering-version: 1 ## The peering version you want to set.
|
||||
spec:
|
||||
peer:
|
||||
secret:
|
||||
name: "peering-token"
|
||||
key: "data"
|
||||
backend: "kubernetes"
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
||||
1. Once you have done this, repeat the steps in the peering process. This includes saving your peering token so that you can export it to the other cluster. This will re-establish peering with the updated token.
|
||||
|
||||
~> **Note:** A new peering token is only generated upon manually setting and updating the value of the annotation `consul.hashicorp.com/peering-version`. Creating a new token will cause the previous token to expire.
|
||||
|
|
Loading…
Reference in New Issue