docs: add controller to cluster peering docs (#13639)

* docs: add controller to cluster peering docs
This commit is contained in:
David Yu 2022-06-29 11:08:37 -07:00 committed by GitHub
parent 5c17ef792c
commit 8f8ed954cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -40,6 +40,8 @@ To establish cluster peering through Kubernetes, deploy clusters with the follow
enabled: true
connectInject:
enabled: true
controller:
enabled: true
meshGateway:
enabled: true
replicas: 1
@ -98,7 +100,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
$ kubectl apply --filename peering-token.yml
```
1. In "cluster-02," create the `PeeringDialer` custom resource.
1. In `cluster-02`, create the `PeeringDialer` custom resource.
<CodeBlockConfig filename="dialer.yml">
@ -139,7 +141,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
</CodeBlockConfig>
1. In "cluster-02," create an `ExportedServices` custom resource.
1. In `cluster-02`, create an `ExportedServices` custom resource.
<CodeBlockConfig filename="exportedsvc.yml">
@ -150,9 +152,9 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
name: default ## The name of the partition containing the service
spec:
services:
name: backend-service ## The name of the service you want to export
consumers:
peerName: cluster-01 ## The name of the peer that receives the service
- name: backend-service ## The name of the service you want to export
consumers:
- peer: cluster-01 ## The name of the peer that receives the service
```
</CodeBlockConfig>
@ -184,13 +186,13 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
$ kubectl apply --filename backend-service.yml --filename exportedsvc.yml --filename intention.yml
```
1. To confirm that you peered your clusters, in "cluster-01," query the `/health` HTTP endpoint.
1. To confirm that you peered your clusters, in `cluster-01`, query the `/health` HTTP endpoint.
```shell-session
$ curl "localhost:8500/v1/health/connect/backend?peer=cluster-02"
```
1. For the services in "cluster-01" that you want to access the "backend-service," add the following annotations to the service file.
1. For the services in `cluster-01` that you want to access the "backend-service," add the following annotations to the service file.
<CodeBlockConfig filename="frontend-service.yml">
@ -227,7 +229,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
To end a peering connection, delete both the `PeeringAcceptor` and `PeeringDialer` resources.
To confirm that you deleted your peering connection, in "cluster-01," query the `/health` HTTP endpoint. The peered services should no longer appear.
To confirm that you deleted your peering connection, in `cluster-01`, query the `/health` HTTP endpoint. The peered services should no longer appear.
```shell-session
$ curl "localhost:8500/v1/health/connect/backend?peer=cluster-02"