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
360
からあげの町からお届けするフルリモートSREの日常 / 2023-06-21 tech lunch
yamamotofebc
0
200
「合意のない期待」を防ぐためのドラッカー風エクササイズ
yamamotofebc
3
1k
さくらのクラウド向けオートスケーラー / autoscaler for SAKURA cloud
yamamotofebc
1
1.8k
sacloud tools
yamamotofebc
1
88
Rioでコンテナを楽しくする / Rio − Make Containers Fun!
yamamotofebc
2
670
Rancher 2.0 HA with Terraform
yamamotofebc
3
3.5k
Rancher Meetup Hiroshima #1 LT - カタログを使ってみよう // Rancher Meetup Hiroshima 2018-05-11
yamamotofebc
2
610
Rancher Meetup KYOTO #1 LT - 外からコンテナに繋ぐには? // Rancher Meetup Kyoto 2018-04-27
yamamotofebc
4
420
Other Decks in Technology
See All in Technology
信頼性に挑む中で拡張できる・得られる1人のスキルセットとは?
ken5scal
2
530
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
990
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
6
620
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
130
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
220
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
A better future with KSS
kneath
238
17k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
How GitHub (no longer) Works
holman
310
140k
Practical Orchestrator
shlominoach
186
10k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Building Applications with DynamoDB
mza
90
6.1k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
A designer walks into a library…
pauljervisheath
204
24k
Statistics for Hackers
jakevdp
796
220k
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