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
Building HA Kubernetes Clusters with RKE
Search
Kazumichi Yamamoto
April 20, 2018
Technology
4
2.9k
Building HA Kubernetes Clusters with RKE
Slide for #RancherMeetup at Osaka,Japan
Kazumichi Yamamoto
April 20, 2018
Tweet
Share
More Decks by Kazumichi Yamamoto
See All by Kazumichi Yamamoto
オートスケールにおけるオブザーバビリティへの取り組み / Observability with autoscale
yamamotofebc
1
420
からあげの町からお届けするフルリモートSREの日常 / 2023-06-21 tech lunch
yamamotofebc
0
210
「合意のない期待」を防ぐためのドラッカー風エクササイズ
yamamotofebc
3
1k
さくらのクラウド向けオートスケーラー / autoscaler for SAKURA cloud
yamamotofebc
1
1.8k
sacloud tools
yamamotofebc
1
91
Rioでコンテナを楽しくする / Rio − Make Containers Fun!
yamamotofebc
2
680
Rancher 2.0 HA with Terraform
yamamotofebc
3
3.5k
Rancher Meetup Hiroshima #1 LT - カタログを使ってみよう // Rancher Meetup Hiroshima 2018-05-11
yamamotofebc
2
620
Rancher Meetup KYOTO #1 LT - 外からコンテナに繋ぐには? // Rancher Meetup Kyoto 2018-04-27
yamamotofebc
4
420
Other Decks in Technology
See All in Technology
Snykで始めるセキュリティ担当者とSREと開発者が楽になる脆弱性対応 / Getting started with Snyk Vulnerability Response
yamaguchitk333
2
180
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
190
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
31k
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
160
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
120
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
260
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
440
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
AWS re:Invent 2024 ふりかえり
kongmingstrap
0
130
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
222
9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Rails Girls Zürich Keynote
gr2m
94
13k
BBQ
matthewcrist
85
9.4k
Documentation Writing (for coders)
carmenintech
66
4.5k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Unsuck your backbone
ammeep
669
57k
The Cult of Friendly URLs
andyhume
78
6.1k
Scaling GitHub
holman
458
140k
Transcript
3BODIFS.FFUVQ04"," !ZBNBNPUP@GFCD #VJMEJOH)",VCFSOFUFT$MVTUFSTXJUI3,&
,B[VNJDIJ :BNBNPUP !ZBNBNPUP@GFCD 8IP
None
• ,VCFSOFUFT*OTUBMMFS • )JHI"WBJMBCJMJUZ$MVTUFST 8IBUJT
#BDLHSPVOEPG
None
None
˙ #BTFEPO%PDLFS ˙ +BWBBOE(PMBOH ˙ .Z42- ˙ .VMUJ0SDIFTUSBUJPOUPPMT ˙ #BTFEPO,VCFSOFUFT
˙ (PMBOH ˙ FUDE ˙ ,VCFSOFUFTPOMZ
None
)PXUPBEEDMVTUFS
XBZTUPBEEDMVTUFS .BOBHFELT *NQPSUDMVTUFS $SFBUFDMVTUFS
.BOBHFE,VCFSOFUFT 6TFlLPOUBJOFSFOHJOFz UPQSPWJTJPOJOH(,&&,4",4 IUUQTHJUIVCDPNSBODIFSLPOUBJOFSFOHJOF
*NQPSUFYJTUJOHLTDMVTUFS LVCFDUM EFQMPZTlDBUUMFOPEFBHFOUzBOElDBUUMFDMVTUFSBHFOUz
$SFBUFLTDMVTUFS XJUIEPDLFSNBDIJOF %PDLFS.BDIJOF 3,& LPOUBJOFSFOHJOF $SFBUFEPDLFSOPEF 1SPWJTJPOJOHLTDMVTUFS
`$SFBUFLTDMVTUFS XJUIFYJTUJOHEPDLFS &YJTUJOHEPDLFS 3,& LPOUBJOFSFOHJOF 1SPWJTJPOJOHLTDMVTUFS
)PXUPXPSL
0WFSWJFX 44) 1SPWJTJPOJOH
n %PDLFS n 0QFO44) n .FNCFSPGlEPDLFSzHSPVQ n 0QFO1PSUT CFUXFFOOPEFT n
%JTBCMF4XBQ XPSLFSOPEFT 1SFSFRVJTJUFTGPSOPEFT
)PXUPXPSL FUDE LVCFBQJTFSWFS LVCFDPOUSPMMFS TDIFEVMFS LVCFMFU DOJ &UD (FOFSBUFLFZQBJSBOEDFSU GPSYBVUI
1SPWJTJPOJOHLTDPNQPOFOUT DMVTUFSZNM 44)
)PXUPVTF
*OTUBMM3,& $SFBUFDMVTUFSZNM 3VOlSLF VQz )PXUPVTF
n %PXOMPBE3,&CJOBSZ *OTUBMM3,& $ curl -L -o rke $RKE_URL n
3VODINPE $ chmod +x rke 3,&@63-IUUQTHJUIVCDPNSBODIFSSLFSFMFBTFTEPXOMPBEWSLF@EBSXJOBNE
n .JOJNBMDMVTUFSZNM $SFBUFDMVTUFSZNM node: - address: 1.2.3.4 user: ubuntu role:
[etcd, controlplane, worker]
3VOlSLF VQz $ ./rke up --config cluster.yml
n DMVTUFSZNM /PEFSPMFT node: - address: 1.2.3.4 user: ubuntu role:
[etcd, controlplane, worker]
/PEFSPMFT DMVTUFSZNM 3BODIFS8FC6*
3VOOJOHDPOUBJOFSTQFSSPMF SPMFFUDE FUDE LVCFQSPYZ DOJ LVCFMFU SLFOHJOYQSPYZ SPMF DPOUSPMQMBOF DOJ
LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS DPOUSPMMFSNBOBHFS TDIFEVMFS SPMFXPSLFS DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ
)"$MVTUFSXJUI
3FEVOEBOUXPSLFST FUDE $MVTUFSJOH 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
3FEVOEBOUXPSLFST FUDE $MVTUFSJOH 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
3FEVOEBOUXPSLFST n .VMUJQMFXPSLFSQSPWJTJPOJOH node: - address: 192.2.0.1 role: [controlplane, etcd]
- address: 192.2.0.2 role: [worker] - address: 192.2.0.3 role: [worker] - address: 192.2.0.4 role: [worker]
FUDE SPMFDPOUSPMQMBOF FUDE DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS DPOUSPMMFSNBOBHFS TDIFEVMFS
SPMFXPSLFS DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ 3FEVOEBOUXPSLFST SPMFXPSLFS DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ SPMFXPSLFS DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ
3FEVOEBOUXPSLFST FUDE $MVTUFSJOH 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
3FEVOEBOUXPSLFST FUDE $MVTUFSJOH 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
n .VMUJQMFFUDE QSPWJTJPOJOH node: - address: 192.2.0.1 role: [etcd, controlplane,
workers] - address: 192.2.0.2 role: [etcd, controlplane, workers] - address: 192.2.0.3 role: [etcd, controlplane, workers] FUDE $MVTUFSJOH
FUDE $MVTUFSJOH n FUDE CPPUTUSBQDPOGJHVSBUJPO $ docker inspect etcd ...
--initial-cluster= etcd-node1=https://192.2.0.1:2380, etcd-node2=https://192.2.0.2:2380, etcd-node3=https://192.2.0.3:2380
FUDE $MVTUFSJOH n "1*4FSWFSTCPPUTUSBQDPOGJHVSBUJPO $ docker inspect kube-apiserver ... --etcd-servers=
https://192.2.0.1:2379, https://192.2.0.2:2379, https://192.2.0.3:2379
3FEVOEBOUXPSLFST FUDE $MVTUFSJOH 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
3FEVOEBOUXPSLFST FUDE $MVTUFSJOH 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
n .VMUJQMFDPOUSPMQMBOF QSPWJTJPOJOH node: - address: 192.2.0.1 role: [etcd, controlplane,
workers] - address: 192.2.0.2 role: [etcd, controlplane, workers] - address: 192.2.0.3 role: [etcd, workers] 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
FUDE LVCFQSPYZ DOJ LVCFMFU SLFOHJOYQSPYZ DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS
DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ FUDE BQJTFSWFS FUDE 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
FUDE LVCFQSPYZ DOJ LVCFMFU SLFOHJOYQSPYZ DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS
DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ FUDE BQJTFSWFS FUDE n 2VFTUJPO8IJDI"1*4FSWFSEPFTLVCFMFU VTF ? ? ? 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
FUDE LVCFQSPYZ DOJ LVCFMFU SLFOHJOYQSPYZ DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS
DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ FUDE BQJTFSWFS FUDE n "OTXFS6TF3,&OHJOYQSPYZ 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST https://127.0.0.1:6443 https://127.0.0.1:6443
n "OTXFS6TF3,&OHJOYQSPYZ $ cat /etc/kubernetes/ssl/kubecfg-kube-node.yaml apiVersion: v1 kind: Config clusters:
- cluster: api-version: v1 server: "https://127.0.0.1:6443" name: "local" 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
3FEVOEBOUXPSLFST FUDE $MVTUFSJOH 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
3FEVOEBOUXPSLFST FUDE $MVTUFSJOH 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
n .VMUJQMFDPOUSPMQMBOF QSPWJTJPOJOH node: - address: 192.2.0.1 role: [etcd, controlplane,
workers] - address: 192.2.0.2 role: [etcd, controlplane, workers] - address: 192.2.0.3 role: [etcd, controlplane, workers] TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO
FUDE LVCFQSPYZ DOJ LVCFMFU SLFOHJOYQSPYZ DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS
DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ FUDE BQJTFSWFS FUDE TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO BQJTFSWFS DPOUSPMMFSNBOBHFS TDIFEVMFS DPOUSPMMFSNBOBHFS TDIFEVMFS DPOUSPMMFSNBOBHFS TDIFEVMFS
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO
n MFBEFSFMFDUGMBH TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO $ docker inspect kube-scheduler ... --leader-elect=true $
docker inspect kube-controller-manager ... --leader-elect=true
FUDE LVCFQSPYZ DOJ LVCFMFU SLFOHJOYQSPYZ DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS
DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ FUDE BQJTFSWFS FUDE TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO BQJTFSWFS DPOUSPMMFSNBOBHFS TDIFEVMFS
3FEVOEBOUXPSLFST FUDE $MVTUFSJOH 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
JT)"3FBEZ
3FNBJOJOH*TTVFT
1SFSFRVJTJUFTGPSOPEFT n %PDLFS n 0QFO44) n .FNCFSPGlEPDLFSzHSPVQ n 0QFO1PSUT CFUXFFOOPEFT
n %JTBCMF4XBQ XPSLFSOPEFT *TUIFSFBNPSFCFUUFSXBZ
3,&XJUI5FSSBGPSN 5FSSBGPSNQSPWJEFSQMVHJOGPS3,& IUUQTHJUIVCDPNZBNBNPUPGFCDUFSSBGPSNQSPWJEFSSLF
$IFDLJUPVU IUUQTSBODIFSKQDPOOQBTTDPNFWFOU
&OKPZ