Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update site documentation to reflect firewall prefix and default to Autopilot cluster creation for Agones #3769

Merged
merged 8 commits into from
Apr 24, 2024
Merged
56 changes: 26 additions & 30 deletions site/content/en/docs/Installation/Creating Cluster/gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,37 @@ We need a firewall to allow UDP traffic to nodes tagged as `game-server` via por
next section.

```bash
gcloud compute firewall-rules create game-server-firewall \
gcloud compute firewall-rules create gke-agones-game-server-firewall \
vicentefb marked this conversation as resolved.
Show resolved Hide resolved
--allow udp:7000-8000 \
--target-tags game-server \
--description "Firewall to allow game server udp traffic"
```

### Create an Autopilot mode cluster for Agones
vicentefb marked this conversation as resolved.
Show resolved Hide resolved

You can read more about choosing a [cluster mode above](#choosing-a-gke-cluster-mode).
zmerlynn marked this conversation as resolved.
Show resolved Hide resolved

1. Choose a [Release Channel]({{<ref "/docs/Guides/Best Practices/gke.md#release-channels" >}}) (Autopilot clusters must be on a Release Channel).

1. Create the cluster:

```bash
gcloud container clusters create-auto [CLUSTER_NAME] \
--region=[COMPUTE_REGION] \
--release-channel=[RELEASE_CHANNEL] \
--autoprovisioning-network-tags=game-server
```

Replace the following:
* `[CLUSTER_NAME]`: The name of your cluster.
* `[COMPUTE_REGION]`: the GCP region to create the cluster in.
* `[RELEASE_CHANNEL]`: one of `rapid`, `regular`, or `stable`, chosen [above](#choosing-a-release-channel-and-optional-version). The default is `regular`.

Flag explanations:
* `--region`: The compute region [you chose above](#choosing-a-gke-cluster-mode).
* `--release-channel`: The release channel [you chose above](#choosing-a-release-channel-and-optional-version).
* `--autoprovisioning-network-tags`: Defines the tags that will be attached to new nodes in the cluster. This is to grant access through ports via the [firewall created above](#creating-the-firewall).

## Creating the cluster

Create a GKE cluster in which you'll install Agones. You can use
Expand Down Expand Up @@ -292,35 +317,6 @@ Flag explanations:
* `--machine-type`: The type of machine to use for nodes. Default: `e2-standard-4`. Depending on the needs of your game, you may wish to [have smaller or larger machines](https://cloud.google.com/compute/docs/machine-types).
* `--num-nodes`: The number of nodes per cluster zone. For regional clusters, `--num-nodes=1` creates one node in 3 separate zones in the region, giving you faster recovery time in the event of a node failure.

### Create an Autopilot mode cluster for Agones

{{<alert title="Note" color="info">}}
These installation instructions apply to Agones 1.30+
{{</alert>}}

1. Choose a [Release Channel]({{<ref "/docs/Guides/Best Practices/gke.md#release-channels" >}}) (Autopilot clusters must be on a Release Channel).

1. Create the cluster:

```bash
gcloud container clusters create-auto [CLUSTER_NAME] \
--region=[COMPUTE_REGION] \
--release-channel=[RELEASE_CHANNEL] \
--autoprovisioning-network-tags=game-server
```

Replace the following:
* `[CLUSTER_NAME]`: The name of your cluster.
* `[COMPUTE_REGION]`: the GCP region to create the cluster in.
* `[RELEASE_CHANNEL]`: one of `rapid`, `regular`, or `stable`, chosen [above](#choosing-a-release-channel-and-optional-version). The default is `regular`.

Flag explanations:
* `--region`: The compute region [you chose above](#choosing-a-gke-cluster-mode).
* `--release-channel`: The release channel [you chose above](#choosing-a-release-channel-and-optional-version).
* `--autoprovisioning-network-tags`: Defines the tags that will be attached to new nodes in the cluster. This is to grant access through ports via the [firewall created above](#creating-the-firewall).



## Setting up cluster credentials

`gcloud container clusters create` configurates credentials for `kubectl` automatically. If you ever lose those, run:
Expand Down
2 changes: 1 addition & 1 deletion site/layouts/shortcodes/gs-prerequisites.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- $test := eq (.Get "link_test") "true" | default true }}
<p>The following prerequisites are required to create a GameServer:</p>
<ol>
<li>A Kubernetes cluster with the UDP port range 7000-8000 open on each node.</li>
<li>A Kubernetes cluster with the UDP port range 7000-8000 open on each node. <a href="/site/docs/installation/creating-cluster/gke/#creating-the-firewall">Creating the firewall</a></li>
vicentefb marked this conversation as resolved.
Show resolved Hide resolved
<li>Agones controller installed in the targeted cluster</li>
<li>kubectl properly configured</li>
<li>Netcat which is already installed on most Linux/macOS distributions, for windows you can use <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">WSL</a>.</li>
Expand Down
Loading