Automated provisoning EKS or ECS cluster, worker nodes are managed by Auto Scaling group and made up with On-Demand and Spot instances.
# choose you favorite cluster name
export IS_ECS=yes
export ECS_CLUSTER_NAME=my-ecs-cluster
export AWS_DEFAULT_REGION=#?#
export AWS_ACCESS_KEY_ID=#?#
export AWS_SECRET_ACCESS_KEY=#?#
npm run build
cdk deploy GoEcs
aws ecs list-clusters
# choose you favorite cluster name
unset IS_ECS
export EKS_CLUSTER_NAME=my-eks-cluster
export EKS_STAGE_1=yes
export AWS_DEFAULT_REGION=#?#
export AWS_ACCESS_KEY_ID=#?#
export AWS_SECRET_ACCESS_KEY=#?#
npm run build
cdk deploy GoEks
sudo su -
kubectl get svc
kubectl get nodes
When you create an Amazon EKS cluster, the IAM entity user or role, such as a federated user that creates the cluster, is automatically granted system:masters permissions in the cluster's RBAC configuration. To grant additional AWS users or roles the ability to interact with your cluster, you must edit the aws-auth ConfigMap within Kubernetes.
https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html https://stackoverflow.com/questions/50791303/kubectl-error-you-must-be-logged-in-to-the-server-unauthorized-when-accessing