Skip to content

chore: Setup docs for Kubernetes on Google Cloud - to handle the cloud provider's required node image change from Docker to containerd #1037

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

Merged
merged 3 commits into from
Jul 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions setup/kubernetes/google.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ be sure to account for the number of developers you expect to use Coder, as well
as the resources they need to run their workspaces. See our guide on on
[compute resources](../../guides/admin/resources.md) for additional information.

> In GKE version 1.24 and later, Docker-based [node image types](https://cloud.google.com/kubernetes-engine/docs/concepts/node-images)
> are not supported. The examples below use `ubuntu_containerd` and
> `cos_containerd` to meet this requirement. Docker-based node images will
> prevent GKE cluster creation.

If you expect to provision GPUs to your Coder workspaces, you **must** use a
general-purpose
[N1 machine type](https://cloud.google.com/compute/docs/machine-types#gpus) in
Expand Down Expand Up @@ -52,27 +57,30 @@ that makes the most sense for your location.
> See See [Network Policies](../requirements.md#network-policies) for more
> information.

The sample scripts below create an `e2-standard-4` instance with 2 nodes for
evaluation purposes, with a configuration to auto-scale to 8 nodes as more
developer workspace pods are created. Depending on your needs, you can choose
other sizes. See [machine type
comparisons](https://cloud.google.com/compute/docs/machine-types#machine_type_comparison)
in particular [general-purpose machine types like n1 and
e2](https://cloud.google.com/compute/docs/general-purpose-machines). See
[requirements](../requirements.md) for help estimating your cluster size.

### Option 1: Cluster with full support of Coder features

This option uses an Ubuntu node image to enable support of
[Container-based Virtual Machines (CVMs)](../../admin/workspace-management/cvms.md),
allowing system-level functionalities such as Docker in Docker.

> Please note that the sample script creates a `n1-highmem-4` instance;
> depending on your needs, you can choose a
> [larger size](https://cloud.google.com/compute/docs/machine-types#machine_type_comparison)
> instead. See [requirements](../requirements.md) for help estimating your
> cluster size.

```console
gcloud beta container --project "$PROJECT_ID" \
clusters create "$NEW_CLUSTER_NAME" \
--zone "$ZONE" \
--no-enable-basic-auth \
--node-version "latest" \
--cluster-version "latest" \
--machine-type "n1-highmem-4" \
--image-type "UBUNTU" \
--machine-type "e2-standard-4" \
--image-type "ubuntu_containerd" \
--disk-type "pd-standard" \
--disk-size "50" \
--metadata disable-legacy-endpoints=true \
Expand All @@ -99,20 +107,14 @@ This option uses a Container-Optimized OS (COS) and meets Coder's minimum
requirements. It does _not_ enable the use of
[CVMs](../../admin/workspace-management/cvms.md).

> Please note that the sample script creates a `n1-highmem-4` instance;
> depending on your needs, you can choose a
> [larger size](https://cloud.google.com/compute/docs/machine-types#machine_type_comparison)
> instead. See [requirements](../requirements.md) for help estimating your
> cluster size.

```console
gcloud beta container --project "$PROJECT_ID" \
clusters create "$NEW_CLUSTER_NAME" \
--zone "$ZONE" \
--no-enable-basic-auth \
--cluster-version "latest" \
--machine-type "n1-highmem-4" \
--image-type "COS" \
--machine-type "e2-standard-4" \
--image-type "cos_containerd" \
--disk-type "pd-standard" \
--disk-size "50" \
--metadata disable-legacy-endpoints=true \
Expand Down