Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building HA Kubernetes Clusters with RKE

Building HA Kubernetes Clusters with RKE

Slide for #RancherMeetup at Osaka,Japan

Kazumichi Yamamoto

April 20, 2018
Tweet

More Decks by Kazumichi Yamamoto

Other Decks in Technology

Transcript

  1. 

  2. n %PXOMPBE3,&CJOBSZ *OTUBMM3,& $ curl -L -o rke $RKE_URL n

    3VODINPE $ chmod +x rke 3,&@63-IUUQTHJUIVCDPNSBODIFSSLFSFMFBTFTEPXOMPBEWSLF@EBSXJOBNE
  3. 3VOOJOHDPOUBJOFSTQFSSPMF SPMFFUDE FUDE LVCFQSPYZ DOJ LVCFMFU SLFOHJOYQSPYZ SPMF DPOUSPMQMBOF DOJ

    LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS DPOUSPMMFSNBOBHFS TDIFEVMFS SPMFXPSLFS DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ
  4.  3FEVOEBOUXPSLFST  FUDE $MVTUFSJOH  3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST 

    TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
  5.  3FEVOEBOUXPSLFST  FUDE $MVTUFSJOH  3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST 

    TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
  6. 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]
  7. 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
  8.  3FEVOEBOUXPSLFST  FUDE $MVTUFSJOH  3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST 

    TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
  9.  3FEVOEBOUXPSLFST  FUDE $MVTUFSJOH  3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST 

    TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
  10. 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
  11. 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
  12. 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
  13.  3FEVOEBOUXPSLFST  FUDE $MVTUFSJOH  3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST 

    TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
  14.  3FEVOEBOUXPSLFST  FUDE $MVTUFSJOH  3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST 

    TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
  15. 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
  16. FUDE LVCFQSPYZ DOJ LVCFMFU SLFOHJOYQSPYZ DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS

    DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ FUDE BQJTFSWFS FUDE 3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST
  17. 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
  18. 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
  19. 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
  20.  3FEVOEBOUXPSLFST  FUDE $MVTUFSJOH  3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST 

    TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
  21.  3FEVOEBOUXPSLFST  FUDE $MVTUFSJOH  3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST 

    TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH
  22. 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
  23. 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
  24. FUDE LVCFQSPYZ DOJ LVCFMFU SLFOHJOYQSPYZ DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ BQJTFSWFS

    DOJ LVCFQSPYZ LVCFMFU SLFOHJOYQSPYZ FUDE BQJTFSWFS FUDE TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO BQJTFSWFS DPOUSPMMFSNBOBHFS TDIFEVMFS
  25.  3FEVOEBOUXPSLFST  FUDE $MVTUFSJOH  3FQMJDBUFE -PBE#BMBODFE "1*4FSWFST 

    TDIFEVMFSDUSMNBOBHFS-FBEFS&MFDUJPO 3FRVJSFEGPS)"DMVTUFS #VJMEJOH)JHI"WBJMBCJMJUZ$MVTUFST IUUQTLVCFSOFUFTJPEPDTBENJOIJHIBWBJMBCJMJUZCVJMEJOH