Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
[k8s novice x JAWSコンテナ]Kubernetes Wakaran Tokyo...
Search
枡川健太郎
February 21, 2025
0
53
[k8s novice x JAWSコンテナ]Kubernetes Wakaran Tokyo #3 EKS Hands-on 解説
枡川健太郎
February 21, 2025
Tweet
Share
More Decks by 枡川健太郎
See All by 枡川健太郎
CloudWatch MCP サーバーと CloudWatch Application Signals MCP サーバーを使ってみた
masukawa
2
320
[re:Inforce2025振り返り勉強会]アプリケーションコードもIaCコードもまとめてチェック! Amazon InspcetorのCode Securityを試してみる!
masukawa
0
29
re_Invent 2024 コンテナ関連アップデート総まとめ #cmregrowth
masukawa
0
660
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
RailsConf 2023
tenderlove
30
1.2k
Become a Pro
speakerdeck
PRO
29
5.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Code Review Best Practice
trishagee
69
19k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Transcript
[k8s novice x JAWSコンテ ナ]Kubernetes Wakaran Tokyo #3 EKS Hands-on
解説
全体アーキテクチャー
EKSのアーキテクチャー JAWS-UG コンテナ支部 #27 EKSワークショップ ハンズオン
VPC Module • VPCとNAT gatewayを作成 • AWS Load Balancer Controller経由でLBを作成す
る場合、下記タグを付与することでサブネットID の指定が不要になる ◦ kubernetes.io/role/elb=1 ◦ kubernetes.io/role/internal-elb=1 Network Load Balancers で TCP および UDP トラフィックをルーティングする
EKS Module • EKSクラスターとNodeGroupを作成 • cluster_endpoint_public_acces=trueなので、コ ントロールプレーンにインターネット経由でアク セス可能 ◦ 下記のような設定も可能
▪ VPC内からのアクセスに絞る ▪ パブリックかつIP制限 • (実は)全く同じ設定なので、NodeGroupを2つ作成 する意味はない ◦ 下記のような要件で分けることが多い ▪ スポットインスタンスを利用 ▪ PodをデプロイするAZを明示的に指定 • KarpenterやEKS AutoModeでは、Nodeが足りな くなった際に直接EC2が登録される
コントロールプレーンへの認証について aws eks update-kubeconfig --name <クラスター名> EKSクラスターへ「kubectl」コマンドでアクセスする際の認証・認可の仕組みと設定 | DeveloperIO kubeconfig
ファイルを自動生成 aws-authと呼ばれる ConfigMapを触る必要あり
aws-auth クラスター作成者は設定不要でAdmin相当
EKSアクセスエントリ A deep dive into simplified Amazon EKS access management
controls EKSの設定で完結
EKSアクセスエントリ EKS APIとConfigMapに変更可能
EKSアクセスエントリ IAMプリンシパルと プリセットされたポリシーを紐づけ
AWS Load Balancer Controller
AWS Load Balancer Controller • マニフェストファイル適用の結果、AWS Load Balancer ControllerがNLBを作成してくれる •
Ingressリソースを作成して、ALBを作成する ことも可能 • LBの詳細な設定はannotationsで実施可能 ◦ Annotations | AWS Load Balancer Controller
IRSA(IAM Roles for Service Accounts) 詳解: IAM Roles for Service
Accounts eksctlで設定を行っている eksctl utils associate-iam-oidc-provider eksctl create iamserviceaccount
IRSA(IAM Roles for Service Accounts) 下記作業が必要 • OIDCプロバイダーの作成 • Service
Accountの作成 ◦ annotationsの追加が必要 • IAMロールの作成 • Service Accountを指定してPod作成
EKS Pod Identity Service AccountとIAMロールを指定するだけ
aws-auth、アクセスエントリ、IRSA、Pod Identityの整理 権限を与える対象 以前からの方式(今回はこちら) 新しい方式 Kubernetesを扱うユーザー aws-auth アクセスエントリ Pod IRSA
Pod Identity