LoginSignup
1
1

More than 1 year has passed since last update.

eksctlでクラスターを作成する時の事前準備

Last updated at Posted at 2022-11-18

eksctlとは、AWSでKubernetesを操作するAWS EKSのコマンドラインツールのことを指す。
以下から、curlやhomebrewでインストールが事前に必要。

次のコマンドではデフォルトのクラスタが生成される。

eksctl create cluster

・自動生成された名前を持つ
・m5.largeの2台のworker nodes
・EC2は、公式AWS EKS AMI
・EKS用のvpcが生成される。

注意点は、リージョンがus-west-2になること。
リージョン指定は、以下のようなコマンドで指定できる。

ksctl create cluster --name 作成するクラスター名 --region ap-northeast-1 --profile 指定したIAMユーザー

もしも、カスタマイズが必要であれば、yamlファイルを作成し、コマンドからyamlファイルを指定して、
生成をする。yamlに記載する。

eksctl create cluster -f cluster.yaml

yaml例: https://eksctl.io/

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: basic-cluster
  region: eu-north-1

nodeGroups:
  - name: ng-1
    instanceType: m5.large
    desiredCapacity: 10
  - name: ng-2
    instanceType: m5.xlarge
    desiredCapacity: 2
1
1
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
1
1