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
320
からあげの町からお届けするフルリモートSREの日常 / 2023-06-21 tech lunch
yamamotofebc
0
200
「合意のない期待」を防ぐためのドラッカー風エクササイズ
yamamotofebc
3
1k
さくらのクラウド向けオートスケーラー / autoscaler for SAKURA cloud
yamamotofebc
1
1.8k
sacloud tools
yamamotofebc
1
86
Rioでコンテナを楽しくする / Rio − Make Containers Fun!
yamamotofebc
2
660
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
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
1
500
[JAWS-UG金沢支部×コンテナ支部合同企画]コンテナとは何か
furuton
3
240
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
730
物価高なラスベガスでの過ごし方
zakky
0
370
生成AIとAWS CDKで実現! 自社ブログレビューの効率化
ymae
2
330
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
1
610
[AWS JAPAN 生成AIハッカソン] Dialog の紹介
yoshimi0227
0
150
フルカイテン株式会社 採用資料
fullkaiten
0
36k
いまならこう作りたい AWSコンテナ[本格]入門ハンズオン 〜2024年版 ハンズオンの構想〜
horsewin
9
2.1k
pandasはPolarsに性能面で追いつき追い越せるのか
vaaaaanquish
4
4.5k
CAMERA-Suite: 広告文生成のための評価スイート / ai-camera-suite
cyberagentdevelopers
PRO
3
270
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Bash Introduction
62gerente
608
210k
Agile that works and the tools we love
rasmusluckow
327
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Adopting Sorbet at Scale
ufuk
73
9k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
It's Worth the Effort
3n
183
27k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Thoughts on Productivity
jonyablonski
67
4.3k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
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