LoginSignup
0
2

More than 3 years have passed since last update.

AWS EKS をはじめてみる

Last updated at Posted at 2019-08-14

はじめに

EKSをまだ試したことがなかったので、ドキュメントに従って、EKSを始めてみます。
躓いたら、下記の公式ドキュメントから読んでいくといいと思います。
https://docs.aws.amazon.com/ja_jp/eks/latest/userguide/what-is-eks.html

コマンドの備忘レベルで、特別なことはしてません。すいません。

下記続編もあります。

インストール

私はMacなので、eksctlhomebrewでインストールしました。
eksctlをインストールすると一緒にkubectlもインストールされます。便利ですね。

$ brew install weaveworks/tap/eksctl
$ which eksctl
/usr/local/bin/eksctl
$ which kubectl
/usr/local/bin/kubectl
$ eksctl version
[ℹ]  version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.3.1"}

aws configure

すでにやってる人は必要ないですし、プロファイルを切り替えて操作する人は適宜対応してほしいです。

※下記は https://docs.aws.amazon.com/ja_jp/eks/latest/userguide/getting-started-eksctl.html から持ってきたサンプル

$ aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json

作る

eksctl create cluster \
--name development \
--region ap-northeast-1
--version 1.13 \
--nodegroup-name standard-workers \
--node-type t2.micro \
--nodes 1 \
--nodes-min 1 \
--nodes-max 1 \
--node-ami auto
--profile ***(必要なら)

aws eks --region ap-northeast-1 update-kubeconfig --name development --profile ***(必要なら)

作った

$ kubectl get svc
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.100.0.1   <none>        443/TCP   18h
0
2
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
2