This deployment guide shows you how to set up an Amazon Elastic Kubernetes Engine cluster on which Coder can deploy.
Before proceeding, please make sure that you have the eksctl command line utility installed on your machine.
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
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
Post-Deployment
We recommend running Coder in a separate namespace; to do so:
-
Create your namespace:
kubectl create namespace coder
-
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.