Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # eksctl ## eksctl delete <code> eksctl delete cluster --name eks-demo </code> ## yaml <code> $ eksctl create cluster \ --name eks-demo \ --region ap-northeast-2 \ --nodes 1 \ --node-type t2.medium \ --nodegroup-name eks-demo </code> <code> apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: eks-demo region: ap-northeast-2 managedNodeGroups: - name: eks-demo-spot instanceTypes: ["t2.micro"] spot: true </code> <code> # An example of ClusterConfig showing nodegroups with mixed instances (spot and on demand): --- apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: eks-cluster region: ap-northeast-2 nodeGroups: - name: eks-ng minSize: 1 maxSize: 10 desiredCapacity: 1 instancesDistribution: maxPrice: 0.017 instanceTypes: ["t3.small", "t3.medium"] # At least one instance type should be specified onDemandBaseCapacity: 0 onDemandPercentageAboveBaseCapacity: 50 spotInstancePools: 2 </code> <code> # spot-cluster.yaml apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: spot-cluster region: us-west-2 managedNodeGroups: - name: spot instanceTypes: ["c3.large","c4.large","c5.large","c5d.large","c5n.large","c5a.large"] spot: true # `instanceTypes` defaults to [`m5.large`] - name: spot-2 spot: true # On-Demand instances - name: on-demand instanceTypes: ["c3.large", "c4.large", "c5.large"] </code> <code> $ eksctl create cluster -f spot-cluster.yaml </code> - https://eksctl.io/usage/spot-instances/ ## 설치 <code> brew tap weaveworks/tap brew install weaveworks/tap/eksctl 업그레이드: brew upgrade eksctl && brew link --overwrite eksctl </code> ## 클러스터 생성 <code> $ eksctl create cluster \ --name eks-demo \ --region ap-northeast-2 \ --nodes 1 \ --node-type t2.medium \ --nodegroup-name eks-demo </code> eksctl 명령을 실행해서 Amazon EKS 클러스터를 생성한다. <code bash> $ eksctl create cluster \ --name k8s-demo \ --region ap-northeast-2 \ --with-oidc \ --ssh-access \ --ssh-public-key aws--login-key \ --nodes 3 \ --node-type t3.medium \ --node-volume-size=20 \ --managed </code> <code> eksctl create cluster -f spot-cluster.yaml </code> ### spot-cluster.yaml <code> apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: my-eks region: ap-northeast-2 managedNodeGroups: - name: my-eks-t2-large minSize: 1 maxSize: 3 desiredCapacity: 1 instanceType: 't2.large' volumeSize: 10 volumeType: gp2 spot: true </code> ## Docs - [[oidc]] - [[eni]] ## Links - https://github.com/weaveworks/eksctl - https://github.com/doitintl/eks-spot-to-ondemand-fallback/blob/master/cluster/cluster.yaml open/eksctl.txt Last modified: 2024/10/05 06:15by 127.0.0.1