|
| 1 | +--- |
| 2 | +title: Cluster setup |
| 3 | +description: Learn how to set up K8s clusters capable of supporting CVMs. |
| 4 | +--- |
| 5 | + |
| 6 | +The following sections show how you can set up your Kubernetes clusters hosted |
| 7 | +by Google, Azure, and Amazon to support CVMs. |
| 8 | + |
| 9 | +## Google Cloud Platform w/ GKE |
| 10 | + |
| 11 | +To use CVMs with GKE, [create a cluster](../../../setup/kubernetes/google.md) |
| 12 | +with the following parameters set: |
| 13 | + |
| 14 | +- GKE Master version `latest` |
| 15 | +- `node-version = "latest"` |
| 16 | +- `image-type = "UBUNTU"` |
| 17 | + |
| 18 | +Example: |
| 19 | + |
| 20 | +```console |
| 21 | +gcloud beta container clusters create "YOUR_NEW_CLUSTER" \ |
| 22 | + --node-version "latest" \ |
| 23 | + --cluster-version "latest" \ |
| 24 | + --image-type "UBUNTU" |
| 25 | + ... |
| 26 | +``` |
| 27 | + |
| 28 | +## Azure Kubernetes Service |
| 29 | + |
| 30 | +If you're using Kubernetes version `1.18`, Azure defaults to the correct Ubuntu |
| 31 | +node base image. When |
| 32 | +[creating your cluster](../../../setup/kubernetes/azure.md), set |
| 33 | +`--kubernetes-version` to `1.18.x` or newer for CVMs. |
| 34 | + |
| 35 | +## Amazon Web Services w/ EKS |
| 36 | + |
| 37 | +You can modify an existing |
| 38 | +[AWS-hosted container](../../../setup/kubernetes/aws.md) to support CVMs by |
| 39 | +[creating a nodegroup](https://eksctl.io/usage/managing-nodegroups/#creating-a-nodegroup-from-a-config-file) |
| 40 | +and updating your `eksctl` config spec. |
| 41 | + |
| 42 | +1. Define your config file in the location of your choice (we've named the file |
| 43 | + `coder-node.yaml`, but you can call it whatever you'd like): |
| 44 | + |
| 45 | + ```yaml |
| 46 | + apiVersion: eksctl.io/v1alpha5 |
| 47 | + kind: ClusterConfig |
| 48 | + |
| 49 | + metadata: |
| 50 | + version: "1.21" |
| 51 | + name: <YOUR_CLUSTER_NAME> |
| 52 | + region: <YOUR_AWS_REGION> |
| 53 | + |
| 54 | + nodeGroups: |
| 55 | + - name: coder-node-group |
| 56 | + amiFamily: Ubuntu2004 |
| 57 | + ami: <your Ubuntu 20.04 AMI ID> |
| 58 | + ``` |
| 59 | +
|
| 60 | + > [See here for a list of EKS-compatible Ubuntu AMI IDs](https://cloud-images.ubuntu.com/docs/aws/eks/) |
| 61 | +
|
| 62 | +1. Create your nodegroup using the config file you just created (be sure to |
| 63 | + provide the correct file name): |
| 64 | +
|
| 65 | + ```console |
| 66 | + eksctl create nodegroup --config-file=coder-node.yaml |
| 67 | + ``` |
0 commit comments