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.3k
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
190
Cracking the KubeCon CfP
inductor
2
930
KubeCon Recap -Platform migration at Scale-
inductor
1
1.1k
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
600
データベースとストレージのレプリケーション入門 / 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.7k
Other Decks in Technology
See All in Technology
クラウドセキュリティ入門 ~安全なクラウド利用のための基礎知識~
lhazy
13
11k
同じWAFが、攻撃の“形”は弾く── 正当な“形”の不正は通す
kuroneko13
0
190
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
390
JavaScript 研修 (2026)
recruitengineers
PRO
2
540
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
4k
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
200
【CEDEC2026】Creative Approaches to Localizing the Dialects and Unique Speech of Umamusume: Pretty Derby Characters in English
cygames
PRO
3
19k
ボトムアップ文化が強い組織で セキュリティをどう根付かせていくかの現在進行形の話 / Making Security Stick in a Bottom-Up Organization
yamaguchitk333
0
220
老害フォレンジッカーはAI羊の夢を見るか?
tadmaddad
0
330
MulticaとPi Coding Agentで、小規模OSSを30本同時運用した流れ
eiei114
0
110
QAエンジニア起点で進める、SmartHRにおける信頼性向上について
kaomi_wombat
1
140
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
2
830
Featured
See All Featured
Building Adaptive Systems
keathley
44
3.2k
So, you think you're a good person
axbom
PRO
2
2.1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
430
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Deep Space Network (abreviated)
tonyrice
0
250
The SEO Collaboration Effect
kristinabergwall1
1
520
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
430
Raft: Consensus for Rubyists
vanstee
141
7.6k
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 で立ち上がってきたので面白かったです(小並感)
手軽におうちで 高可用クラスター生活が 捗りますね!!!!!
ご清聴ありがとうございました