DEV Community

PanupongDeve
PanupongDeve

Posted on • Edited on

2

[AWS EKS] Setup Worker Nodes with EC2

install eksctl

https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html

install kubectl

https://kubernetes.io/docs/tasks/tools/install-kubectl/

eksctl-cluster-ec2.yaml

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: my-cluster-ec2
region: ap-southeast-1
nodeGroups:
- name: ng-1
instanceType: t3.small
desiredCapacity: 3
ssh:
publickeyName: the1-cpp

time eksctl create cluster -f eksctl-cluster-ec2.yaml

basic eksctl

eksctl get cluster

eksctl get nodegroup --cluster my-cluster-ec2

eksctl scale nodegroup --cluster=my-cluster-ec2 --nodes=5 --name=ng-1

Alt Text

update nodegroups

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: my-cluster-ec2
region: ap-southeast-1
nodeGroups:
- name: ng-1
instanceType: t3.small
desiredCapacity: 3
ssh:
publickeyName: the1-cpp
- name: ng-mixed
minSize: 3
maxSize: 5
instancesDistribution:
maxPrice: 0.2
instanceTypes: ["t3.small"]
onDemandBaseCapacity: 0
onDemandPercentageAboveBaseCapacity: 50
ssh:
publickeyName: the1-cpp

eksctl create nodegroup --config-file=cluster-ec2.yaml --include='ng-mixed'

delete nodegroups

eksctl delete nodegroup --config-file=cluster-ec2.yaml --include='ng-mixed' --approve

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more