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
kube-vipで作るお手軽 高可用クラスター ~外出しHAProxyからの卒業~ / Say...
Search
Kohei Ota
February 25, 2021
Technology
4.4k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
kube-vipで作るお手軽 高可用クラスター ~外出しHAProxyからの卒業~ / Say good-bye to HAProxy and Keepalived with kube-vip on your K8s
Kohei Ota
February 25, 2021
More Decks by Kohei Ota
See All by Kohei Ota
CloudNative Meets WebAssembly: Exploring Wasm's Potential to Replace Containers
inductor
4
3.6k
The Cloud Native Chronicles: 10 Years of Community Growth Inside and Outside Japan
inductor
0
200
Cracking the KubeCon CfP
inductor
2
930
KubeCon Recap -Platform migration at Scale-
inductor
1
1.1k
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
610
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
28
6.7k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
1k
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.4k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
23
7.8k
Other Decks in Technology
See All in Technology
grill-me(grilling):AI駆動開発を超助けてくれるSkill / grill me
mathbullet
0
110
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
110
enechainの内製セルフサービスプラットフォーム
hiyosi
0
110
PfEingのアプローチで働こう
rindrics
0
180
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
3
830
Azure App Service / Container Apps の組み込み認証
kuniteru
0
190
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
0
410
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
0
170
Driving AI Adoption Using In-House GPUs to Serve Qwen
po3rin
2
450
Jetpack Compose で挑む新聞紙面UI ─ 複合ジェスチャー・ポリゴン記事領域・適応的ページ構成という3つの壁/droidkaigi2026
nikkei_engineer_recruiting
0
200
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
110
Hub & Spoke 環境のネットワークルーティングを分解してみる
tsuyataku
1
530
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
580
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
How GitHub (no longer) Works
holman
316
150k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
320
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
How STYLIGHT went responsive
nonsquared
100
6.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
650
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Designing for Timeless Needs
cassininazir
1
470
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
410
Transcript
kube-vipで作るお手軽 高可用クラスター ~外出しHAProxyからの卒業~ 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
免責事項 - 今回作成するクラスターはkubeadmの利用を前提としています - kube-vip v0.3.1時点での要求 - kube-vipについて説明をしますが、HAProxyやKeepalivedについての説明はLTな ので省略します -
kube-vipはまだバージョンが若いので、今回の手順や構成図は今後変更される可 能性があります
HAProxyからの卒業?
これまでのオンプレKubernetesにおける 高可用性クラスターの基本構成
None
Kubernetesのノード Kubernetes外リソース
HAProxy+Keepalivedによるロードバランシング - ふつーにオンプレでサーバー建てるのと同じHAProxy構成 - バックエンドにKubernetes Control planeを複数台配置 - HAProxyはVM/ベアメタルで配置するのでKubernetesとは別で管理 -
Kubernetes上でHAProxyの管理はしない ※このHAProxyはIngressとは違い、kube-apiserverを冗長化するための ロードバランサーです
HAProxy+Keepalivedによるロードバランシング - ふつーにオンプレでサーバー建てるのと同じHAProxy構成 - バックエンドにKubernetes Control planeを複数台配置 - HAProxyはVM/ベアメタルで配置するのでKubernetesとは別で管理 -
Kubernetes上でHAProxyの管理はしない ※このHAProxyはIngressとは違い、kube-apiserverを冗長化するための ロードバランサーです Kubernetesで全部管理したい!!!! ・・・したくない???
そこでkube-vip
kube-vip
kube-vip - kube-vipはKubernetesの「中と外」に負荷分散機能を与える OSS - api-serverの負荷分散 - HAProxyの代替 - Type:
LoadBalancer機能の提供(with Plunder Cloud Provider) - MetalLBなどの代替 これらの機能が「ハイブリッドに」提供できるのが便利
kube-vip - kube-vipはKubernetesの「中と外」に負荷分散機能を与える OSS - api-serverの負荷分散 - HAProxyの代替 - Type:
LoadBalancer機能の提供(with Plunder Cloud Provider) - MetalLBなどの代替 これらの機能が「ハイブリッドに」提供できるのが便利
kube-vip - kube-vipはKubernetesの「中と外」に負荷分散機能を与える OSS - api-serverの負荷分散 - HAProxyの代替 - Type:
LoadBalancer機能の提供(with Plunder Cloud Provider) - MetalLBなどの代替 これらの機能が「ハイブリッドに」提供できるのが便利 Tanzu Kubernetes Grid(🥚かけ🍚)でも バージョン1.2から採用
kube-vipの構成
kube-vipの構成
192.168.0.100 (VIP) 192.168.0.201 192.168.0.202 192.168.0.203 Kubernetes control plane nodes Incoming
traffic Global Endpoint 192.168.0.204 192.168.0.205 192.168.0.206 Kubernetes control worker nodes kubectl https://global-endpoint:6443 https://192.168.0.100:6443 Static Pod or DaemonSet
kube-vipの構成 - Static Pod - 単一の構成なら一番簡単 - kubeadmでクラスターを作るときに Pod manifestを/etc/kubernetes/manifests配下に配置
- 各コントロールプレーンノードに配置もできるっぽいけどやり方がよく分からない() - DaemonSet(推奨) - コントロールプレーンごとに LB Podが立ち上がってVIPでやりとりするので本番向け 他にも、APIのLBだけ構成するかServiceでも使うようにしたいか、LBの構成にBGPを 使うかARPを使うかや、DDNS、DHCPなど様々な動的設定もできるようになっている (詳細はドキュメント参照)
さいごに - 使ってみた記事を英語で上げてます https://inductor.medium.com/say-good-bye-to-haproxy-and-keepalived-with-k ube-vip-on-your-ha-k8s-control-plane-bb7237eca9fc - 説明の都合上一番シンプルなStatic Pod + API
LBのみにしましたが、実際にPod で立ち上がってきたので面白かったです(小並感)
手軽におうちで 高可用クラスター生活が 捗りますね!!!!!
ご清聴ありがとうございました