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
3.6k
kube-vipで作るお手軽 高可用クラスター ~外出しHAProxyからの卒業~ / Say good-bye to HAProxy and Keepalived with kube-vip on your K8s
Kohei Ota
February 25, 2021
Tweet
Share
More Decks by Kohei Ota
See All by Kohei Ota
CloudNative Meets WebAssembly: Exploring Wasm's Potential to Replace Containers
inductor
4
3.1k
The Cloud Native Chronicles: 10 Years of Community Growth Inside and Outside Japan
inductor
0
140
Cracking the KubeCon CfP
inductor
2
660
KubeCon Recap -Platform migration at Scale-
inductor
1
1k
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
540
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
29
6.5k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
890
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.3k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
22
6.6k
Other Decks in Technology
See All in Technology
オブザーバビリティが育むシステム理解と好奇心
maruloop
2
1.3k
What's new in OpenShift 4.20
redhatlivestreaming
0
280
「最速」で Gemini CLI を使いこなそう! 〜Cloud Shell/Cloud Run の活用〜 / The Fastest Way to Master the Gemini CLI — with Cloud Shell and Cloud Run
aoto
PRO
1
180
QA業務を変える(!?)AIを併用した不具合分析の実践
ma2ri
0
150
Implementing and Evaluating a High-Level Language with WasmGC and the Wasm Component Model: Scala’s Case
tanishiking
0
180
IoTLT@ストラタシスジャパン_20251021
norioikedo
0
140
20251027_findyさん_音声エージェントLT
almondo_event
2
440
スタートアップの現場で実践しているテストマネジメント #jasst_kyushu
makky_tyuyan
0
130
[VPoE Global Summit] サービスレベル目標による信頼性への投資最適化
satos
0
250
マルチエージェントのチームビルディング_2025-10-25
shinoyamada
0
180
生成AI時代のPythonセキュリティとガバナンス
abenben
0
140
Observability — Extending Into Incident Response
nari_ex
1
450
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Documentation Writing (for coders)
carmenintech
75
5.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
4 Signs Your Business is Dying
shpigford
185
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
Designing Experiences People Love
moore
142
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
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 で立ち上がってきたので面白かったです(小並感)
手軽におうちで 高可用クラスター生活が 捗りますね!!!!!
ご清聴ありがとうございました