This article has been archived. Please see Coder Docs for the updated version.
This deployment guide shows you how to set up an Amazon Elastic Kubernetes Engine cluster on which Coder can deploy.
Prerequisites
Before proceeding, please make sure that you have the eksctl command line utility installed on your machine.
Step 1: Spin up a K8 Cluster
The following will spin up a Kubernetes cluster using the eksctl command; replace the parameters and environment variables as needed to reflect those for your environment.
CLUSTER_NAME="MY_CLUSTER_NAME" SSH_KEY_PATH="~/.ssh/my-public-key.pub" REGION="us-east-2" \
eksctl create cluster \
--name "$CLUSTER_NAME" \
--version 1.17 \
--region "$REGION" \
--nodegroup-name standard-workers \
--node-type t3.medium \
--nodes 2 \
--nodes-min 2 \
--nodes-max 8 \
--ssh-access \
--ssh-public-key "$SSH_KEY_PATH" \
--managed
Step 2: Adjust the K8 Storage Class
Once the cluster is created, adjust the Kubernetes storage class that is created by default to support immediate volume binding.
First, delete the gp2 storage class:
kubectl delete sc gp2
Next, recreate the gp2 storage class with the volumeBindingMode
set to Immediate
:
cat <<EOF | kubectl apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "true"
name: gp2
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
fsType: ext4
volumeBindingMode: Immediate
EOF
Step 3: Post-Deployment
We recommend running Coder in a separate namespace; to do so:
First, create your namespace:
kubectl create namespace coder
Next, change the kubectl context to point to your newly created namespace:
kubectl config set-context --current --namespace=coder
Comments
0 comments
Please sign in to leave a comment.