mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
<CodeBlockConfig> fixes
This commit is contained in:
parent
c5b5a6ee76
commit
740246797b
@ -41,6 +41,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
1. In “cluster-01,” create the `PeeringAcceptor` custom resource.
|
||||
|
||||
<CodeBlockConfig filename="acceptor.yml">
|
||||
|
||||
```yaml
|
||||
apiVersion: consul.hashicorp.com/v1alpha1
|
||||
kind: PeeringAcceptor
|
||||
@ -53,6 +54,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
key: "data"
|
||||
backend: "kubernetes"
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
||||
1. Apply the `PeeringAcceptor` resource to the first cluster.
|
||||
@ -76,6 +78,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
1. In “cluster-02,” create the `PeeringDialer` custom resource.
|
||||
|
||||
<CodeBlockConfig filename="dialer.yml">
|
||||
|
||||
```yaml
|
||||
apiVersion: consul.hashicorp.com/v1alpha1
|
||||
kind: PeeringDialer
|
||||
@ -88,6 +91,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
key: "data"
|
||||
backend: "kubernetes"
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
||||
1. Apply the `PeeringDialer` resource to the second cluster.
|
||||
@ -101,6 +105,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
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).
|
||||
|
||||
<CodeBlockConfig filename="backend-service.yml">
|
||||
|
||||
```yaml
|
||||
##…
|
||||
annotations:
|
||||
@ -108,11 +113,13 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
"consul.hashicorp.com/transparent-proxy": "false"
|
||||
##…
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
||||
1. In “cluster-02,” create an `ExportedServices` custom resource.
|
||||
|
||||
<CodeBlockConfig filename="exportedsvc.yml">
|
||||
|
||||
```yaml
|
||||
apiVersion: consul.hashicorp.com/v1alpha1
|
||||
kind: ExportedServices
|
||||
@ -125,9 +132,12 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
peerName: cluster-01 ## The name of the peer that receives the service
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
||||
1. Create service intentions for the second cluster.
|
||||
|
||||
<CodeBlockConfig filename="intention.yml">
|
||||
|
||||
```yaml
|
||||
apiVersion: consul.hashicorp.com/v1alpha1
|
||||
kind: ServiceIntentions
|
||||
@ -142,6 +152,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
- name: frontend-service
|
||||
action: allow
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
||||
1. Apply the service file, the `ExportedServices` resource, and the intentions to the second cluster.
|
||||
@ -159,6 +170,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
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">
|
||||
|
||||
```yaml
|
||||
##…
|
||||
annotations:
|
||||
@ -167,6 +179,7 @@ To peer Kubernetes clusters running Consul, you need to create a peering token a
|
||||
"consul.hashicorp.com/connect-service-upstreams": "backend-service.svc.cluster-02.peer:1234"
|
||||
##…
|
||||
```
|
||||
|
||||
</CodeBlockConfig>
|
||||
|
||||
1. Apply the service file to the first cluster.
|
||||
|
Loading…
x
Reference in New Issue
Block a user