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
Cracking the KubeCon CfP
inductor
2
290
KubeCon Recap -Platform migration at Scale-
inductor
1
870
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
390
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
26
5.8k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
670
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.1k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
18
5.5k
コンテナネイティブロードバランシングの話 / A story about container native load balancing
inductor
1
1.8k
DockerCon Live 2021 Recap
inductor
2
1k
Other Decks in Technology
See All in Technology
CockroachDB はどのくらい「しぶとい」のか? / How tough is CockroachDB?
kota2and3kan
13
4.9k
汎用ポリシー言語Rego + OPAと認可・検証事例の紹介 / Introduction Rego & OPA for authorization and validation
mizutani
1
130
From here to resilience - a travel guide
ufried
1
160
QAエンジニアが伝えたい品質保証の羅針盤 / Compass for Quality Assurance
mii3king
1
320
kcp: Kubernetes APIs Are All You Need #techfeed_live / TechFeed Experts Night 28th
ytaka23
1
190
【TSkaigi】2024/05/11 当日スライド
kimitashoichi
14
3.9k
技術力の伸ばし方を考える
khirata
0
140
Prisma ORMを2年運用して培ったノウハウを共有する
tockn
19
5k
データ分析力を高めるSQL研修サービス『SQL Everyone』
hikarut
1
380
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
0
2k
能動学習のいろは:書籍「Human-in-the-Loop機械学習」3〜5章
hiroyoshiito
0
290
エムスリーQAチーム紹介資料 / Introduction of M3 QA Team
m3_engineering
1
320
Featured
See All Featured
The Cult of Friendly URLs
andyhume
74
5.7k
A Tale of Four Properties
chriscoyier
153
22k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
A Modern Web Designer's Workflow
chriscoyier
689
190k
What’s in a name? Adding method to the madness
productmarketing
PRO
17
2.7k
Making the Leap to Tech Lead
cromwellryan
125
8.6k
GitHub's CSS Performance
jonrohan
1025
450k
What the flash - Photography Introduction
edds
64
11k
Clear Off the Table
cherdarchuk
86
310k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Side Projects
sachag
451
41k
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