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
グローバル展開を見据えたサービスにおける機械翻訳プラクティス / dp-ai-translating
cyberagentdevelopers
PRO
1
150
来年もre:Invent2024 に行きたいあなたへ - “集中”と“つながり”で楽しむ -
ny7760
0
460
サイバーエージェントにおける生成AIのリスキリング施策の取り組み / cyber-ai-reskilling
cyberagentdevelopers
PRO
2
190
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
210
初心者に Vue.js を 教えるには
tsukuha
5
390
Amazon FSx for NetApp ONTAPを利用するにあたっての要件整理と設計のポイント
non97
1
160
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
27
12k
GitHub Universe: Evaluating RAG apps in GitHub Actions
pamelafox
0
170
生成AIと知識グラフの相互利用に基づく文書解析
koujikozaki
1
140
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
1
600
なんで、私がAWS Heroに!? 〜社外の広い世界に一歩踏み出そう〜
minorun365
PRO
6
1.1k
コンテンツを支える 若手ゲームクリエイターの アートディレクションの事例紹介 / cagamefi-game
cyberagentdevelopers
PRO
1
120
Featured
See All Featured
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Statistics for Hackers
jakevdp
796
220k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Building Applications with DynamoDB
mza
90
6.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
What's in a price? How to price your products and services
michaelherold
243
12k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
We Have a Design System, Now What?
morganepeng
50
7.2k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Faster Mobile Websites
deanohume
304
30k
GraphQLとの向き合い方2022年版
quramy
43
13k
Making the Leap to Tech Lead
cromwellryan
132
8.9k
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