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

Kubernetes provisioning

kakao
December 09, 2022

Kubernetes provisioning

#Kubernetes #Provisioning

카카오에서는 쿠버네티스를 서비스하기 위해 DKOS를 사용하고 있습니다.

본 세션에서는 DKOS가 쿠버네티스를 서비스 하기 위해, 고려하였던 프로비저닝 툴들과 선택을 시작으로, 시행착오를 거쳐,
프로비저닝 툴을 걷어내기까지의 여정을 공유 드리고자 합니다.

감사합니다

발표자 : rookie.jeon
카카오에서 클라우드 플랫폼을 개발하고 있는 루키입니다.

kakao

December 09, 2022
Tweet

More Decks by kakao

Other Decks in Programming

Transcript

  1. ੹޹୍ rookie.jeon ஠஠য় Copyright 2022. Kakao Corp. All rights reserved.

    Redistribution or public display is not permitted without written permission from Kakao. Kubernetes provisioning if(kakao)2022 ೐۽࠺੷׬ ోҗ੄ ݅թࠗఠ ೻য૗ө૑ . . .
  2. ஠஠য়ীࢲ ௢ߡ֎౭झܳ ࢲ࠺झ ೞח ߑध ௢ߡ֎౭झ ೐۽࠺੷׬ ో ࢶఖೞӝ ਍৔઺

    ו՛ ೐۽࠺੷׬ ో(Kubespray)੄ ইए਍੼ ೐۽࠺੷׬ ో੄ ب਑ হ੉ ௢ߡ֎౭झ ࢲ࠺झ ೞӝ ੿ܻ ߂ ݃ޖܻ
  3. ஠஠য়ীࢲ ௢ߡ֎౭झܳ ࢲ࠺झ ೞח ߑध ௢ߡ֎౭झ ೐۽࠺੷׬ ో ࢶఖೞӝ ਍৔઺

    ו՛ ೐۽࠺੷׬ ో(Kubespray)੄ ইए਍੼ ೐۽࠺੷׬ ో੄ ب਑ হ੉ ௢ߡ֎౭झ ࢲ࠺झ ೞӝ ੿ܻ ߂ ݃ޖܻ
  4. DKOSীࢲ যڃ ੘সਸ ࣻ೯೧ঠ ೡө? 1. VM ࢤࢿ (OpenStack ӝ߈੄

    ࢎղ IaaS ೐۽ં౟ੋ krane ࢎਊ) 2. kernel / OS ౵ۄ޷ఠ ࢸ੿ 3. ஶప੉ց ۠ఋ੐ ҳ୷ 4. ௢ߡ֎౭झ ҳ୷ 5. managed pod ߓನ
  5. ஠஠য়ীࢲ ௢ߡ֎౭झܳ ࢲ࠺झ ೞח ߑध ௢ߡ֎౭झ ೐۽࠺੷׬ ో ࢶఖೞӝ ਍৔઺

    ו՛ ೐۽࠺੷׬ ో(Kubespray)੄ ইए਍੼ ೐۽࠺੷׬ ో੄ ب਑ হ੉ ௢ߡ֎౭झ ࢲ࠺झ ೞӝ ੿ܻ ߂ ݃ޖܻ
  6. kubeadm੉ۆ ޖ঺ੋо? DKOS Kubeadm ੢੼ উ੿ࢿ рױೣ ױ੼ ગ਷ ૑ਗ

    ߧਤ (য়૒ ௢ߡ֎౭झ ࢸ஖݅ ૑ਗ) ѐ߹ ੘স ࣻ೯ Node A - Z A - Z A - Z
  7. Kubesprayۆ ޖ঺ੋо? Kubespray ੢੼ և਷ ߧਤ੄ ੗زച ૑ਗ ׮নೠ ࢶఖ૑

    ઁҕ ױੌ ࣻ೯ਸ ాೠ ׮ࣻ ֢٘ ઁয оמ উ੿ࢿ DKOS Node access info + ansible script
  8. ஠஠য়ীࢲ ௢ߡ֎౭झܳ ࢲ࠺झ ೞח ߑध ௢ߡ֎౭झ ೐۽࠺੷׬ ో ࢶఖೞӝ ਍৔઺

    ו՛ ೐۽࠺੷׬ ో(Kubespray)੄ ইए਍੼ ೐۽࠺੷׬ ో੄ ب਑ হ੉ ௢ߡ֎౭झ ࢲ࠺झ ೞӝ ੿ܻ ߂ ݃ޖܻ
  9. Kubespray ইए਍੼ - ֢٘ ୶о दр ੘স ࢸݺ ࣻ೯ दр

    ࢎ੹ ੘স оמ ৈࠗ Download binary ‘container runtime, k8s, CNI . . .’ प೯ ౵ੌ ׮਍ 300s Image ղ੢ оמ Set container runtime & k8s container runtime & K8s ࢸ੿ ߂ ҳز 90s ੌࠗ ୊ܻ оמ Generate etc cert etcd cert ࢤࢿ 30s DKOS ୊ܻ оמ Gather facts anisible – inventory ֢٘ ੿ࠁ ࣻ૘ 20s X Set OS proxy, NSS, hostname . . . ࢸ੿ 10s Image ղ੢ оמ 450s – (Image ղ੢ + DKOS ୊ܻ) = 150s ୨ ࢸ஖ दр: 450s
  10. ஠஠য়ীࢲ ௢ߡ֎౭झܳ ࢲ࠺झ ೞח ߑध ௢ߡ֎౭झ ೐۽࠺੷׬ ో ࢶఖೞӝ ਍৔઺

    ו՛ ೐۽࠺੷׬ ో(Kubespray)੄ ইए਍੼ ೐۽࠺੷׬ ో੄ ب਑ হ੉ ௢ߡ֎౭झ ࢲ࠺झ ೞӝ ੿ܻ ߂ ݃ޖܻ
  11. DKOSীࢲ যڃ ੘সਸ ࣻ೯೧ঠ ೡө? 1. VM ࢤࢿ (OpenStack ӝ߈੄

    IaaS ೐۽ં౟ੋ krane ࢎਊ) 2. kernel / OS ౵ۄ޷ఠ ࢸ੿ 3. ஶప੉ց ۠ఋ੐ ҳ୷ 4. ௢ߡ֎౭झ ҳ୷ 5. managed pod ߓನ
  12. DKOSীࢲ যڃ ੘সਸ ࣻ೯೧ঠ ೡө? 1. VM ࢤࢿ (OpenStack ӝ߈੄

    IaaS ೐۽ં౟ੋ krane ࢎਊ) 2. kernel / OS ౵ۄ޷ఠ ࢸ੿ 3. ஶప੉ց ۠ఋ੐ ҳ୷ 4. ௢ߡ֎౭झ ҳ୷ 5. managed pod ߓನ Control plane 1 - 5 ױ҅ ૓೯ ֢٘ ୶о ੿੸ Data plane 1 - 4 ױ҅ ૓೯ ֢٘ ୶о ഝߊ ࢸ஖ दрী ޹х
  13. DKOSীࢲ যڃ ੘সਸ ࣻ೯೧ঠ ೡө? 1. VM ࢤࢿ (OpenStack ӝ߈੄

    IaaS ೐۽ં౟ੋ krane ࢎਊ) 2. kernel / OS ౵ۄ޷ఠ ࢸ੿ 3. ஶప੉ց ۠ఋ੐ ҳ୷ 4. ௢ߡ֎౭झ ҳ୷ 5. managed pod ߓನ Control plane 1 - 5 ױ҅ ૓೯ ֢٘ ୶о ੿੸ Data plane 1 - 4 ױ҅ ૓೯ ֢٘ ୶о ഝߊ ࢸ஖ दрী ޹х
  14. DKOSীࢲ যڃ ੘সਸ ࣻ೯೧ঠ ೡө? 1. VM ࢤࢿ (OpenStack ӝ߈੄

    IaaS ೐۽ં౟ੋ krane ࢎਊ) 2. kernel / OS ౵ۄ޷ఠ ࢸ੿ 3. ஶప੉ց ۠ఋ੐ ҳ୷ 4. ௢ߡ֎౭झ ҳ୷ 5. managed pod ߓನ
  15. DKOSীࢲ যڃ ੘সਸ ࣻ೯೧ঠ ೡө? 1. VM ࢤࢿ (OpenStack ӝ߈੄

    IaaS ೐۽ં౟ੋ krane ࢎਊ) 2. kernel / OS ౵ۄ޷ఠ ࢸ੿ 3. ஶప੉ց ۠ఋ੐ ҳ୷ 4. ௢ߡ֎౭झ ҳ୷ 5. managed pod ߓನ ੿੸ ؘ੉ఠ + ز੸ ؘ੉ఠ
  16. DKOSীࢲ যڃ ੘সਸ ࣻ೯೧ঠ ೡө? 1. VM ࢤࢿ (OpenStack ӝ߈੄

    IaaS ೐۽ં౟ੋ krane ࢎਊ) 2. kernel / OS ౵ۄ޷ఠ ࢸ੿ 3. ஶప੉ց ۠ఋ੐ ҳ୷ 4. ௢ߡ֎౭झ ҳ୷ 5. managed pod ߓನ ੿੸ ؘ੉ఠ (Image) + ز੸ ؘ੉ఠ (Cloud-init)
  17. DKOS Image Repo Cloud-init Data center Krane DataPlane Create VM

    With script ؘ੉ఠ ೒ۨੋ ೐۽࠺੷׬ - ৘द
  18. DKOS Image Repo Cloud-init Data center Krane DataPlane Create VM

    With script Upload script ؘ੉ఠ ೒ۨੋ ೐۽࠺੷׬ - ৘द
  19. DKOS Image Repo Cloud-init Data center Krane DataPlane Create VM

    With script Create VM ؘ੉ఠ ೒ۨੋ ೐۽࠺੷׬ - ৘द Pre-processing image
  20. DKOS Image Repo Cloud-init Data center Krane 1. Request cloud-init

    script 2. Get Cert & Config from script DataPlane ؘ੉ఠ ೒ۨੋ ೐۽࠺੷׬ - ৘द
  21. DKOS Image Repo Cloud-init Data center Krane Config Cert 1.

    Request cloud-init script 2. Get Cert & Config from script DataPlane ؘ੉ఠ ೒ۨੋ ೐۽࠺੷׬ - ৘द
  22. DKOS Image Repo Cloud-init Data center Krane Config Cert ControlPlane

    Join DataPlane ؘ੉ఠ ೒ۨੋ ೐۽࠺੷׬ - ৘द
  23. DKOS Image Repo Cloud-init Data center Krane Config Cert ControlPlane

    Join DataPlane ؘ੉ఠ ೒ۨੋ ೐۽࠺੷׬ - ৘द Done!!
  24. DKOS Image Repo Cloud-init Data center Krane 2. Create VM

    With script 3. Create VM 3. Upload script Config Cert 6. Join ControlPlane 4. Request cloud-init script 5. Get Cert & Config from script 1. Pre-processing image DataPlane ؘ੉ఠ ೒ۨੋ ೐۽࠺੷׬ - ৘द
  25. DKOS Image Repo Cloud-init Data center Krane 2. Create VM

    With script 3. Create VM 3. Upload script Config Cert 6. Join ControlPlane 4. Request cloud-init script 5. Get Cert & Config from script 1. Pre-processing image DataPlane ؘ੉ఠ ೒ۨੋ ೐۽࠺੷׬ - ৘द
  26. DataPlane ControlPlane Kubelet Kube-Proxy ؘ੉ఠ ೒ۨੋ੄ ஶ౟܀ ೒ۨੋ ઑੋ җ੿

    - ৘द kube- apiserver kube- scheduler controller-manager etcd
  27. DataPlane ControlPlane Kubelet Kube-Proxy ؘ੉ఠ ೒ۨੋ੄ ஶ౟܀ ೒ۨੋ ઑੋ җ੿

    - ৘द Cert kube- apiserver kube- scheduler controller-manager etcd
  28. DataPlane ControlPlane Kubelet Kube-Proxy ؘ੉ఠ ೒ۨੋ੄ ஶ౟܀ ೒ۨੋ ઑੋ җ੿

    - ৘द kube- apiserver kube- scheduler controller-manager etcd
  29. DataPlane ControlPlane Kubelet Kube-Proxy ؘ੉ఠ ೒ۨੋ੄ ஶ౟܀ ೒ۨੋ ઑੋ җ੿

    - ৘द Token 1. Create Token kube- apiserver kube- scheduler controller-manager etcd
  30. DataPlane ControlPlane Kubelet Kube-Proxy ؘ੉ఠ ೒ۨੋ੄ ஶ౟܀ ೒ۨੋ ઑੋ җ੿

    - ৘द Token Token Config 1. Create Token 2. Create config kube- apiserver kube- scheduler controller-manager etcd
  31. DataPlane ControlPlane Kubelet Kube-Proxy ؘ੉ఠ ೒ۨੋ੄ ஶ౟܀ ೒ۨੋ ઑੋ җ੿

    - ৘द Token Token Config request cert kube- apiserver kube- scheduler controller-manager etcd
  32. DataPlane ControlPlane Kubelet Kube-Proxy ؘ੉ఠ ೒ۨੋ੄ ஶ౟܀ ೒ۨੋ ઑੋ җ੿

    - ৘द Token send cert Cert kube- apiserver kube- scheduler controller-manager etcd
  33. DataPlane ControlPlane Kubelet Kube-Proxy ؘ੉ఠ ೒ۨੋ੄ ஶ౟܀ ೒ۨੋ ઑੋ җ੿

    - ৘द Token Cert join kube- apiserver kube- scheduler controller-manager etcd
  34. DKOS Image Repo Cloud-init Data center Krane 2. Create VM

    With script 3. Create VM 3. Upload script Config Cert 6. Join ControlPlane 4. Request cloud-init script 5. Get Cert & Config from script 1. Pre-processing image DataPlane ௿ۄ਋٘ ੉׫ী ੹׳غח ౵ੌ
  35. DKOS Image Repo Cloud-init Data center Krane 2. Create VM

    With script 3. Create VM 3. Upload script Config Cert 6. Join ControlPlane 4. Request cloud-init script 5. Get Cert & Config from script 1. Pre-processing image Token Config DataPlane ௿ۄ਋٘ ੉׫ী ੹׳غח ౵ੌ
  36. ஠஠য়ীࢲ ௢ߡ֎౭झܳ ࢲ࠺झ ೞח ߑध ௢ߡ֎౭झ ೐۽࠺੷׬ ో ࢶఖೞӝ ਍৔઺

    ו՛ ೐۽࠺੷׬ ో(Kubespray)੄ ইए਍੼ ೐۽࠺੷׬ ో੄ ب਑ হ੉ ௢ߡ֎౭झ ࢲ࠺झ ೞӝ ੿ܻ ߂ ݃ޖܻ
  37. ੿ܻ - ೐۽࠺੷׬ ో হ੉ ௢ߡ֎౭झ ࢲ࠺झೠ Ѿҗ SSH 450s

    300 task cloud-init 20s ੄ઓࢿ X ਬ૑ ࠁࣻ X dependency