Skip to content

Commit

Permalink
Fix documentation for multi-cluster allocation (#1235)
Browse files Browse the repository at this point in the history
  • Loading branch information
pooneh-m authored Dec 18, 2019
1 parent 0ed511a commit 85d836d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions site/content/en/docs/Advanced/multi-cluster-allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,19 @@ To accept allocation requests from other clusters, agones-allocator for cluster

Follow the steps to configure the [agones allocator REST API service]({{< relref "allocator-service.md">}}). The client certificate pair in the mentioned document is stored as a K8s secret. Here are the secrets to set:

1. Client certificate to talk to other clusters:
1.Client certificate to talk to other clusters:

```bash
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
name: allocator-client-to-cluster-B
namespace: cluster-A-ns
type: Opaque
data:
client.crt: <REDACTED>
client.key: <REDACTED>
tls.crt: <REDACTED>
tls.key: <REDACTED>
ca.crt: <REDACTED>
EOF
```
Expand All @@ -67,16 +68,17 @@ The certificates are base 64 string of the certificate file e.g. `cat ${CERT_FIL

`ca.crt` is the server TLS public certificate if it is self-signed. For simplicity, it is recommended to use one client secret per cluster and make `ca.crt` bundle of server certificates.

2. Add client CA to the list of authorized client certificates by agones-allocator in the targeted cluster.
2.Add client CA to the list of authorized client certificates by agones-allocator in the targeted cluster.

```bash
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
name: allocator-client-ca
namespace: agones-system
type: Opaque
Data:
data:
client1.crt: <REDACTED>
client2.crt: <REDACTED>
Expand All @@ -96,7 +98,7 @@ FLEET_NAME=<fleet name>

curl https://${EXTERNAL_IP}:443/v1alpha1/gameserverallocation \
--header "Content-Type: application/json" \
-d '{"namespace": "'${NAMESPACE}'", "multiClusterSetting": {"enabled": true}, "requiredGameServerSelector": {"matchLabels": {"stable.agones.dev/fleet": "'${FLEET_NAME}'"}}}' \
-d '{"namespace": "'${NAMESPACE}'", "multiClusterSetting": {"enabled": true}, "requiredGameServerSelector": {"matchLabels": {"agones.dev/fleet": "'${FLEET_NAME}'"}}}' \
--key ${KEY_FILE} \
--cert ${CERT_FILE} \
--cacert ${TLS_CERT_FILE} -v
Expand Down

0 comments on commit 85d836d

Please sign in to comment.