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.4k
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.7k
The Cloud Native Chronicles: 10 Years of Community Growth Inside and Outside Japan
inductor
0
130
Cracking the KubeCon CfP
inductor
2
590
KubeCon Recap -Platform migration at Scale-
inductor
1
990
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
520
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
28
6.3k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
830
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.3k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
21
6.3k
Other Decks in Technology
See All in Technology
Machine Intelligence for Vision, Language, and Actions
keio_smilab
PRO
0
490
面接を通過するためにやってて良かったこと3選
sansantech
PRO
0
130
他チームへ越境したら、生データ提供ソリューションのクエリ費用95%削減へ繋がった話 / Cross-Team Impact: 95% Off Raw Data Query Costs
yamamotoyuta
0
230
Introduction to Bill One Development Engineer
sansan33
PRO
0
240
エンジニアが組織に馴染むために勉強会を主催してチームの壁を越える
ohmori_yusuke
2
120
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
Houtou.pm #1
papix
0
660
Azure Developer CLI と Azure Deployment Environment / Azure Developer CLI and Azure Deployment Environment
nnstt1
1
120
大規模PaaSにおける監視基盤の構築と効率化の道のり
lycorptech_jp
PRO
0
170
ローカル環境でAIを動かそう!
falken
PRO
1
170
What's Next in OpenShift Q2 CY2025
redhatlivestreaming
1
770
DevOpsDays Taipei 2025 -- Creating Awesome Change in SmartNews!
martin_lover
0
160
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
How GitHub (no longer) Works
holman
314
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
How STYLIGHT went responsive
nonsquared
100
5.6k
Done Done
chrislema
184
16k
The Cost Of JavaScript in 2023
addyosmani
49
8.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
How to train your dragon (web standard)
notwaldorf
92
6k
The World Runs on Bad Software
bkeepers
PRO
68
11k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Practical Orchestrator
shlominoach
188
11k
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 で立ち上がってきたので面白かったです(小並感)
手軽におうちで 高可用クラスター生活が 捗りますね!!!!!
ご清聴ありがとうございました