docs: formatting on backend application and delete peering CRDs (#15007)
* docs: formatting on backend application and delete peering CRDs Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
This commit is contained in:
parent
22ff376bba
commit
4ba1e75259
|
@ -292,7 +292,7 @@ The examples described in this section demonstrate how to export a service named
|
|||
|
||||
1. Add the `"consul.hashicorp.com/connect-inject": "true"` annotation to your service's pods before deploying the workload so that the services in `cluster-01` can dial `backend` in `cluster-02`. To dial the upstream service from an application, configure the application so that that requests are sent to the correct DNS name as specified in [Service Virtual IP Lookups](/docs/discovery/dns#service-virtual-ip-lookups). In the following example, the annotation that allows the workload to join the mesh and the configuration provided to the workload that enables the workload to dial the upstream service using the correct DNS name is highlighted.
|
||||
|
||||
<CodeBlockConfig filename="frontend.yaml" highlight="34">
|
||||
<CodeBlockConfig filename="frontend.yaml" highlight="36,51">
|
||||
|
||||
```yaml
|
||||
# Service to expose frontend
|
||||
|
@ -405,12 +405,38 @@ The examples described in this section demonstrate how to export a service named
|
|||
## End a peering connection
|
||||
|
||||
To end a peering connection, delete both the `PeeringAcceptor` and `PeeringDialer` resources.
|
||||
|
||||
1. Delete the `PeeringDialer` resource from the second cluster.
|
||||
|
||||
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
|
||||
$ kubectl --context $CLUSTER2_CONTEXT delete --filename dialer.yaml
|
||||
```
|
||||
|
||||
```shell-session
|
||||
$ curl "localhost:8500/v1/health/connect/backend?peer=cluster-02"
|
||||
```
|
||||
1. Delete the `PeeringAcceptor` resource from the first cluster.
|
||||
|
||||
```shell-session
|
||||
$ kubectl --context $CLUSTER1_CONTEXT delete --filename acceptor.yaml
|
||||
````
|
||||
|
||||
1. Confirm that you deleted your peering connection in `cluster-01` by querying the the `/health` HTTP endpoint. The peered services should no longer appear.
|
||||
|
||||
1. Exec into the server pod for the first cluster.
|
||||
|
||||
```shell-session
|
||||
$ kubectl exec -it consul-server-0 -- /bin/sh
|
||||
```
|
||||
|
||||
1. Export an ACL token to access the `/health` HTP endpoint for services. The bootstrap token may be used if an ACL token is not already provisioned.
|
||||
|
||||
```shell-session
|
||||
$ export CONSUL_HTTP_TOKEN=<INSERT BOOTSTRAP ACL TOKEN>
|
||||
```
|
||||
|
||||
1. Query the the `/health` HTTP endpoint. The peered services should no longer appear.
|
||||
|
||||
```shell-session
|
||||
$ curl "localhost:8500/v1/health/connect/backend?peer=cluster-02"
|
||||
```
|
||||
|
||||
## Recreate or reset a peering connection
|
||||
|
||||
|
|
Loading…
Reference in New Issue