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
Amazon Load Balancer Controller クイックオーバービュー / Amazon Load Balancer Controller quick overview
Search
Kohei Ota
November 20, 2020
Technology
1
1.7k
Amazon Load Balancer Controller クイックオーバービュー / Amazon Load Balancer Controller quick overview
Kohei Ota
November 20, 2020
Tweet
Share
More Decks by Kohei Ota
See All by Kohei Ota
KubeCon Recap -Platform migration at Scale-
inductor
1
840
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
370
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
26
5.7k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
640
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.1k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
18
5.4k
コンテナネイティブロードバランシングの話 / A story about container native load balancing
inductor
1
1.8k
DockerCon Live 2021 Recap
inductor
2
1k
Kubernetesをとりまくコンテナランタイムの栄枯盛衰 / The rise and fall of the container runtimes surrounding Kubernetes
inductor
22
47k
Other Decks in Technology
See All in Technology
テストだけで品質は上がらない?! エセ自己組織化した品質組織からの脱却 / JaSST'24 Tokyo
visional_engineering_and_design
9
3k
令和最新版 ソフトウェアエンジニアのためのDJ入門、あるいはDJに学ぶ仕事術 #ya8
stefafafan
1
140
Pass On What You Have Learned: Deploying to Production
ianlee1521
0
150
SwiftUIのpropertyWrapperをふんわり理解する
jambo_develop_team
0
110
Tohoku.Tech #1 「EC-CUBE/AWSの構築をChatGPTに相談してみました」by テンダ
jun2882
0
130
[2024년 3월 세미나] 다른 회사는 퍼널 분석 어떻게 하고 있을까?
datarian
1
1.6k
Combineを中心とした処理をSwift Concurrencyへ (これまでも調べた調査と向き合い)
fumiyasac0921
1
180
The Disturbing Truth: Why Do Most Software Projects Suck?
lemiorhan
0
110
最速思考でバクラク品質を! スタートアップのリアルな課題とQAの実践
nakanao
1
450
GitHub composite actions
hkusu
1
120
Azure AI サービス全体像と Prompt flow 紹介 - Forkwell Library
shohei1029
1
600
マルチテナントの実現におけるDB設計とRLS / Utilizing RSL in multi-tenancy
soudai
20
5k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
0
3.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
185
15k
It's Worth the Effort
3n
180
27k
The Invisible Side of Design
smashingmag
293
49k
Scaling GitHub
holman
456
140k
A Tale of Four Properties
chriscoyier
150
22k
The Cult of Friendly URLs
andyhume
72
5.6k
In The Pink: A Labor of Love
frogandcode
137
21k
A Modern Web Designer's Workflow
chriscoyier
689
190k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
4
1.4k
Design by the Numbers
sachag
274
18k
How STYLIGHT went responsive
nonsquared
92
4.7k
Transcript
ALB Ingress Controllerあらため AWS Load Balancer Controller クイックオーバービュー JAWS-UGコンテナ支部 #18
Presented by @inductor
じこしょうかい apiVersion: inductor.apps/v1 kind: Person metadata: name: “Kohei Ota” Twitter:
“@_inductor_” GitHub: “@inductor” org: “HPE” role: “Solutions Architect” community: “CNCF Ambassador, CloudNative Days organizer, Docker Meetup Tokyo organizer” spec: replicas: 1
Load Balancer Controllerのおもな追加点 LoadBalancer Serviceが使えるようになった! → 名前がAWS Ingress Controllerじゃなくなった一番大きな理由 AWSのロードバランサーを管理するためのカスタムコントローラー爆誕!
1つのALBを複数のIngressリソースで利用可能になった → これまでのALB IngressはIngressの数=ALBの数でコストかかりがちだった 既存のALBに相乗りするなどもできず、Ingress削除=ALB削除 カスタムリソースTargetGroupBindingが追加 → 既存のALB/NLBに対して割り当てるTarget Groupを管理するためのリソース LBのライフサイクルがKubernetesのServiceに依存しなくなるメリットがある (例: クラスターを消したいけどLBは残したいケース)
Load Balancer Controllerのおもな追加点 LoadBalancer Serviceが使えるようになった! → 名前がAWS Ingress Controllerじゃなくなった一番大きな理由 AWSのロードバランサーを管理するためのカスタムコントローラー爆誕!
1つのALBを複数のIngressリソースで利用可能になった → これまでのALB IngressはIngressの数=ALBの数でコストかかりがちだった 既存のALBに相乗りするなどもできず、Ingress削除=ALB削除 カスタムリソースTargetGroupBindingが追加 → 既存のALB/NLBに対して割り当てるTarget Groupを管理するためのリソース LBのライフサイクルがKubernetesのServiceに依存しなくなるメリットがある (例: クラスターを消したいけどLBは残したいケース) 今日は主にここにフォーカ スします
EKSにおけるLoadBalancer Serviceの種類 LBの種類とモード YAMLのアノテーション LB Controller CLB なし 不要 NLB(instance
mode) service.beta.kubernetes.io/aws-load-balancer-type: "nlb" 不要 NLB(ip mode) service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip" 必要
EKSにおけるLoadBalancer Serviceの種類 LBの種類とモード YAMLのアノテーション LB Controller CLB なし 不要 NLB(instance
mode) service.beta.kubernetes.io/aws-load-balancer-type: "nlb" 不要 NLB(ip mode) service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip" 必要 既存のin-tree cloud provider 実装で管理
なぜIPモードの対応が必要か
TargetGroup NodePort TCP: 30001 NodePort TCP: 30001 NodePort TCP: 30001
これまでのService LoadBalancerの振り分け NLB Listener Node Node Node kube-proxy kube-proxy kube-proxy Destination Pod
TargetGroup NodePort TCP: 30001 NodePort TCP: 30001 NodePort TCP: 30001
これまでのService LoadBalancerの振り分け NLB Listener Node Node Node kube-proxy kube-proxy kube-proxy Destination Pod 1. LBがノード(各EC2)のNodePortにロードバランシングしつ つ通信を転送 2. NodePort ServiceからPodのいるノードに通信を転送 3. Podに通信が到達 → これがいわゆる”Instance mode”
IPモードの動き
TargetGroup これまでのService LoadBalancerの振り分け NLB Listener Node Node Node amazon-vpc-cni-k8s Destination
Pod
TargetGroup これまでのService LoadBalancerの振り分け NLB Listener Node Node Node amazon-vpc-cni-k8s Destination
Pod シンプル!!
Appendix: amazon-vpc-cni-k8sについて AWSのVPC上でKubernetesのネットワークを動かすためのCNIプラグイン → CNIが何かについては同じくコンテナ支部で前ぼくが話した 「OSSから理解するEKSとそのエコシステムについて」を御覧ください PodやService(ClusterIP含)にVPCのIPアドレスを割り当てることができるため、AWS のリソースからPod/Serviceに直接通信するようなことも可能 → コンテナネイティブロードバランシングってやつ
今までのService LB実装ではこれに対応しきれていなかった
デモ
まとめ Load Balancer ControllerのNLB-IPを使うとネットワーク由来のボトルネックが 改善される!! ALB Ingressにも嬉しい改善がいっぱい!(今回は時間の関係上取り扱わず) 今日扱った内容の補足資料はこちら YAMLおきば: https://github.com/inductor/aws-container-meetup-sample
前回資料: https://speakerdeck.com/inductor/understanding-eks-and-its-ecosystem-from-oss-perspective