0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

EKSクラスター、ノードグループをCLIで作成する

Posted at

今回、EKS理解のためにCLIでリソースを作成する機会がありました。
クラスター作成に必要な設定は多く、少しわかりにくく感じますね

EKSクラスターを作成する

<>内は置き換えてください

aws eks create-cluster \
  --role-arn <ClusterRoleArn> \
  --resources-vpc-config subnetIds=<SubnetId>, <SubnetId>,endpointPublicAccess=true,endpointPrivateAccess=true,publicAccessCidrs=0.0.0.0/0 \
  --logging '{"clusterLogging":[{"types":["api","audit","authenticator","controllerManager","scheduler"],"enabled":true}]}' \
  --access-config authenticationMode=API \
  --name eks-cluster

endpointPublicAccess=true と publicAccessCidrs=0.0.0.0/0 はセキュリティ上のリスクがある設定です。必要に応じて、適切なCIDR範囲に変更してください。

ノードグループを作成する

<>内は置き換えてください

aws eks create-nodegroup \
  --cluster-name eks-cluster \
  --nodegroup-name nodegroup \
  --scaling-config minSize=2,maxSize=2,desiredSize=2 \
  --subnets "<SubnetId>" "<SubnetId>" \
  --node-role <EKSNodeRoleArn>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?