-
Notifications
You must be signed in to change notification settings - Fork 0
Deploying AWS
To deploy for AWS, you must:
Have the AWS CLI installed (aws cli docs), and configured (docs).
Run terraform apply
.
Immediately after running terraform destroy
,
you need to manually delete the load balancer which gets created to make the grid externally accessible.
From the console in the region with the cluster, go to EC2 -> load balancers, and delete the load balancer.
The load balancer will be cleaned up at some point once it is disassociated from the hub service, but it will prevent the VPC from being deleted until that time comes, so it's best to manually delete it, otherwise the destroy command will time out.
It's very likely that the terraform timeout will 'win' the race, and fail when removing the helm chart.
This is totally fine, run terraform destroy
again and it will proceed as normal.
The helm chart's timeout is set to 10 minutes, at which point you will need to do this.
Sometimes, an apply will break mid-run with the error
Get "<URL>: dial tcp: lookup https://***.eks.amazonaws.com on <IP> no such host
.
To fix this, you need to:
aws eks update-kubeconfig --name grid_cluster --region <cluster region>
-
export KUBE_CONFIG_PATH=~/.kube/config
, where/.kube/config is wherever update-kubeconfig has updated (/.kube/config is the default)
This is likely because you are logged onto the console using a different IAM user than the one which your AWS CLI is configured with.
You are likely viewing the cluster from the root IAM user, and you created the cluster using a different IAM user. You can either log in to the console as that IAM user, or follow these steps to add the root user to the configmap:
- Run
kubectl edit configmap aws-auth -n kube-system
to open the editor- You may need to
export KUBE_EDITOR=vim
orexport KUBE_EDITOR=nano
if you don't havevi
installed
- You may need to
- Add the following to the config map, at the same level as mapRoles
mapUsers: | - userarn: arn:aws:iam::[account_id]:root groups: - system:masters