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.5k
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
2.9k
The Cloud Native Chronicles: 10 Years of Community Growth Inside and Outside Japan
inductor
0
130
Cracking the KubeCon CfP
inductor
2
620
KubeCon Recap -Platform migration at Scale-
inductor
1
1k
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
530
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
28
6.4k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
850
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.3k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
22
6.4k
Other Decks in Technology
See All in Technology
エンジニアリングマネージャー“お悩み相談”パネルセッション
ar_tama
1
640
An introduction to Claude Code SDK
choplin
3
3.2k
複数のGemini CLIが同時開発する狂気 - Jujutsuが実現するAIエージェント協調の新世界
gunta
11
3.1k
Building GoReleaser - from shell script to paid product
caarlos0
0
260
Bliki (ja), and the Cathedral, and the Bazaar
koic
8
1.3k
スプリントゴール未達症候群に送る処方箋
kakehashi
PRO
1
180
20250719_JAWS_kobe
takuyay0ne
1
160
AI駆動開発 with MixLeap Study【大阪支部 #3】
lycorptech_jp
PRO
0
150
メモ整理が苦手な者による頑張らないObsidian活用術
optim
0
110
ecspressoの設計思想に至る道 / sekkeinight2025
fujiwara3
6
580
DATA+AI SummitとSnowflake Summit: ユーザから見た共通点と相違点 / DATA+AI Summit and Snowflake Summit
nttcom
0
190
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
39k
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Code Review Best Practice
trishagee
69
19k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Speed Design
sergeychernyshev
32
1k
It's Worth the Effort
3n
185
28k
Code Reviewing Like a Champion
maltzj
524
40k
Become a Pro
speakerdeck
PRO
29
5.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
The Pragmatic Product Professional
lauravandoore
35
6.8k
For a Future-Friendly Web
brad_frost
179
9.8k
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 で立ち上がってきたので面白かったです(小並感)
手軽におうちで 高可用クラスター生活が 捗りますね!!!!!
ご清聴ありがとうございました