Skip to content
/ go-eks Public

Automated launch EKS or ECS cluster, worker nodes with Auto Scaling Group are made up by On-Demand and Spot.

Notifications You must be signed in to change notification settings

cc4i/go-eks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Launch EKS/ECS by CDK

Automated provisoning EKS or ECS cluster, worker nodes are managed by Auto Scaling group and made up with On-Demand and Spot instances.

Prerequisite

  1. Install AWS CLI

  2. Install AWS SDK

ECS

Blueprint

Configure environment

# 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=#?#

Provision

npm run build
cdk deploy GoEcs

Ready to go

aws ecs  list-clusters

EKS

Blueprint

Configure environment

# 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=#?#

Provision

npm run build
cdk deploy GoEks

Ready to go

sudo su -
kubectl get svc
kubectl get nodes

Note

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

About

Automated launch EKS or ECS cluster, worker nodes with Auto Scaling Group are made up by On-Demand and Spot.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published