Apply suggestions from code review

Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
Co-authored-by: Blake Covarrubias <blake@covarrubi.as>
This commit is contained in:
Jeff Boruszak 2022-06-15 16:15:03 -05:00 committed by GitHub
parent 3141469ef7
commit b9917285ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -60,19 +60,19 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
1. Apply the `PeeringAcceptor` resource to the first cluster. 1. Apply the `PeeringAcceptor` resource to the first cluster.
```shell-session ```shell-session
$ kubectl apply -f acceptor.yml $ kubectl apply --filename acceptor.yml
```` ````
1. Save your peering token so that you can export it to the other cluster. 1. Save your peering token so that you can export it to the other cluster.
```shell-session ```shell-session
$ kubectl get secret peering-token -o yaml > peering-token.yml $ kubectl get secret peering-token --output yaml > peering-token.yml
``` ```
1. Apply the peering token to the second cluster. 1. Apply the peering token to the second cluster.
```shell-session ```shell-session
$ kubectl apply -f peering-token.yml $ kubectl apply --filename peering-token.yml
``` ```
1. In “cluster-02,” create the `PeeringDialer` custom resource. 1. In “cluster-02,” create the `PeeringDialer` custom resource.
@ -97,12 +97,12 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
1. Apply the `PeeringDialer` resource to the second cluster. 1. Apply the `PeeringDialer` resource to the second cluster.
```shell-session ```shell-session
$ kubectl apply -f dialer.yml $ kubectl apply --filename dialer.yml
``` ```
## Deploy and export cluster services ## Deploy and export cluster services
1. For the service in “cluster-02” that you want to export, add the following [annotations to your service files](/docs/k8s/annotations-and-labels#consul-hashicorp-com-connect-service-upstreams). 1. For the service in “cluster-02” that you want to export, add the following [annotations](/docs/k8s/annotations-and-labels#consul-hashicorp-com-connect-service-upstreams) to your service's pods. This service is referred to as "backend-service" in the following steps.
<CodeBlockConfig filename="backend-service.yml"> <CodeBlockConfig filename="backend-service.yml">
@ -158,7 +158,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
1. Apply the service file, the `ExportedServices` resource, and the intentions to the second cluster. 1. Apply the service file, the `ExportedServices` resource, and the intentions to the second cluster.
```shell-session ```shell-session
$ kubectl apply -f backend-service.yml; kubectl apply -f exportedsvc.yml; kubectl apply -f intention.yml $ 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.
@ -185,7 +185,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
1. Apply the service file to the first cluster. 1. Apply the service file to the first cluster.
```shell-session ```shell-session
$ kubectl apply -f frontend-service.yml $ kubectl apply --filename frontend-service.yml
``` ```
1. Run the following command and check the output to confirm that you peered your clusters successfully. 1. Run the following command and check the output to confirm that you peered your clusters successfully.