Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
我が家のKubernetesクラスタ
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Fumihiro Ito
December 14, 2022
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
我が家のKubernetesクラスタ
Fumihiro Ito
December 14, 2022
More Decks by Fumihiro Ito
See All by Fumihiro Ito
Building Applications for Container with Bazel
f110
3
680
Featured
See All Featured
How to Ace a Technical Interview
jacobian
280
24k
Google's AI Overviews - The New Search
badams
0
1.6k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
30 Presentation Tips
portentint
PRO
1
410
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Ruling the World: When Life Gets Gamed
codingconduct
0
380
Heart Work Chapter 1 - Part 1
lfama
PRO
10
36k
The Invisible Side of Design
smashingmag
301
52k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
300
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Transcript
K8s@home #2 (2022/12/14) Fumihiro Ito զ͕ՈͷKubernetesΫϥελ
ςΩετ൛ 👉 https://bit.ly/f110-homecluster Who? • ҏ౻ ࢙ߒ • https://github.com/f110 •
Z Lab Corporation • ϚωʔδυK8sαʔϏεͷ։ൃ • લ৬ͰεϚʔτϑΥϯ͚ήʔϜͷαʔόʔαΠυͷӡ༻ɾ։ൃ
ςΩετ൛ 👉 https://bit.ly/f110-homecluster
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ςΩετ൛ͷϦϯΫΛৗʹࠨԼʹද͓͖ࣔͯ͠·͢
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ͳͥࣗΫϥελΛߏஙͯ͠͠·ͬͨͷ͔
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ͳͥࣗΫϥελΛߏஙͯ͠͠·ͬͨͷ͔ • K8sΤίγεςϜΛࢼͨ͠ΓϚχϑΣετΛॻ࣌͘ʹ͑Δڥ͕ཉ͍͠ • minikube / kind
࣌ʢ2017ʙ2019ʣ • ࠷ॳMacBook ProͰ • Ϧιʔε͕Γͳ͘ͳͬͨͷͰRyzen Threadripper 2950Xʢ16C32Tʣ • ׂͱແΛͯ͠ಈ͘ɺҰ෦͚ͩʹো͕ൃੜ͢Δͱ͍͏͜ͱ͕ͳ͍ • ͦ͏ͩNUCͰΫϥελΛߏங͠Α͏
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ίϯηϓτ • ͦͦ͜͜K8sʹͤΔ • ͋ΔఔΫϥελ্Ͱಈ͔͍ͨ͠ • ͚ͲؤுΓ͗͢ͳ͍
• ͿͬյΕ্ • յΕʢյ͠ʣͯम෮͢Δܦݧ͔ΒֶͿͷଟ͍ • ͪΐͬͱେࣄͳͷΛಈ͔͓ͯ͘͜͠ͱͰम෮ͷϞνϕʔγϣϯʹ͢Δ • ຊʹࠔΔͷ֎ग़͢
ςΩετ൛ 👉 https://bit.ly/f110-homecluster جຊํ • ϛχϚϜ͔Β࢝Ίͯঃʑʹ֦େ͍ͯ͘͠ • ͦΕͳΓʹ҆ఆͯ͠ಈ͘ͷΛ͏ • ॳΊͯߏங͢ΔͷͰ߈Ίͨ͜ͱ͠ͳ͍
• ߏஙɾӡ༻͕ΰʔϧͰͳ͍ • ͦͷ্Ͱಈ͔͢ͷΛࢼͨ͠Γ։ൃͨ͠Γ͍ͨ͠
ςΩετ൛ 👉 https://bit.ly/f110-homecluster $ kubectl get node whale1 -o jsonpath="{.metadata.creationTimestamp}"
2019-10-21T02:59:56Z 2019ʹ2ߏͰ࢝ΊͨΫϥελ ࠓͰίϯτϩʔϧϓϨʔϯx3 ϫʔΧʔx4ͷߏʹ $ kubectl get node NAME STATUS ROLES AGE VERSION rudder1 Ready control-plane 146d v1.24.3 rudder2 Ready control-plane 2y118d v1.24.3 rudder3 Ready control-plane 2y28d v1.24.3 whale1 Ready <none> 3y50d v1.24.3 whale2 Ready <none> 3y50d v1.24.3 whale3 Ready <none> 344d v1.24.3 whale4 Ready <none> 2y216d v1.24.3
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ϋʔυΣΞߏ UniFi Dream Machine Pro UniFi Switch
16 Control Plane Raspberry Pi 4 mem: 4GB disk: 64GB Raspberry Pi 4 mem: 4GB disk: 64GB Raspberry Pi 4 mem: 4GB disk: 64GB Worker Intel NUC Core i3-8109U Mem: 16GB Intel NUC Core i3-10110U Mem: 16GB Minisforum Ryzen 7 2700U Mem: 16GB Intel NUC Core i3-8109U Mem: 16GB
None
UniFi Dream Machine Pro • podmanͰίϯςφΛಈ͔ͤͨΓศརͳͭ • FRRoutingΛಈ͔ͤܦ࿏Λަ͢Δ͜ͱՄ
UniFi Switch 16
ϊʔυ
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ιϑτΣΞߏʢίϯτϩʔϧϓϨʔϯʣ rudder1 keepalived haproxy kube-apiserver etcd rudder2
keepalived haproxy kube-apiserver etcd rudder3 keepalived haproxy kube-apiserver etcd kube-controller-manager kube-scheduler kube-controller-manager kube-scheduler kube-controller-manager kube-scheduler • ΦʔιυοΫεͳ haproxy / keepalived Λͬͨ HA ߏ • controller-manager ͱ scheduler ಉډ • apiserver ϩʔΧϧΞΫηε
ςΩετ൛ 👉 https://bit.ly/f110-homecluster K8sج൫ ߏπʔϧ kubeadm CNI calico ετϨʔδ Rook
/ Ceph ϩʔυόϥϯα MetalLB ίϯςφϨδετϦ Harbor γʔΫϨοτཧ Vault
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ϞχλϦϯά • Prometheus / Grafana / Grafana
Loki ͷ Α͋͘Δߏ • alertmanager Slack ʹ௨͢ΔͷΈ • Loki ʹϩάΛอଘ͍ͯ͠Δ͕΄ͱΜͲ ݟͯͳ͍ prometheus loki promtail node-exporter promtail alertmanager prometheus loki grafana grafana Slack kube-state-metrics
ςΩετ൛ 👉 https://bit.ly/f110-homecluster GitOps • GitHub ʹϓϥΠϕʔτϦϙδτϦͱͯ͠ϚχϑΣετΛஔ͍͍ͯΔ • γʔΫϨοτϚχϑΣετͱͯ͠ೖΕ໊͍ͯͨ •
git-crypt ͰϑΝΠϧࣗମ҉߸Խ͍͕ͯͨ͠ສ͕Ұͷ҉߸ԽΕΛߟྀ͠ ͯϓϥΠϕʔτͰӡ༻ • ArgoCD ͰΫϥελʹద༻͢Δ
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ϊʔυͷηοτΞοϓ • OSͷΠϯετʔϧσΟεϓϨΠͱΩʔϘʔυΛͭͳ͍ͰUSBϒʔτ • OSΠϯετʔϧͷࣗಈԽ͏ػձ͕গͳ͍ͷͰ͋͑ͯߦΘͣ • ϓϩϏδϣχϯάitamae
• ϓϩϏδϣχϯάπʔϧ͍ͣΕࣗ࡞͍ͨ͠
ςΩετ൛ 👉 https://bit.ly/f110-homecluster Ξοϓσʔτ • γϯϓϧʹkubeadmͰ • Ξοϓσʔτ࣌ʹϊʔυҰࢭΊΔ • 1ͣͭҰ࣌తʹ֎ͯ͠আΛ͢Δ
• NUCϗίϦ͕ཷ·Δͱ͙͢ʹྫྷ٫ੑೳ͕མͪΔ • OSͷΞοϓσʔτ͕͋Ε͜ͷλΠϛϯά
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ʑͷӡ༻ • جຊతʹGitOps • γʔΫϨοτVaultʹอଘͯ͠argocd-vault-plugin • ࣗಈͰө͢ΔͷͱࠩΛ֬ೝͯ͠खಈͰө͢Δͷ͕͋Δ
• PrometheusͰࢹͯ͠ΞϥʔτSlack • ΞϥʔτϧʔϧগͳΊ • Ξϥʔτ͕ͳ͍ͱؾ͕͔ͳ͍Α͏ͳͭͷΈΛઃఆ͍ͯ͠Δ • ྫ͑ϊʔυͷCPU༻ͳͲࢹ͠ͳ͍ • CPUϑΝϯͷԻ͕ฉ͑͜ΔͷͰҟৗ͔Δ
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ࣗ࡞Ingress controller • Zero Trust ProxyΛࣗ࡞͍ͯ͠ΔͷͰগ֦͠ுͯ͠Ingress controllerͱͯ͠ৼ
Δ͏Α͏ʹͨ͠ • ৄ͘͠ https://bit.ly/f110-ingress-controller • IngressϦιʔεೝূෆཁͰΞΫηεɺಠࣗϦιʔεೝূͳͲ༷ʑͳઃఆ ͕Ͱ͖Δ • GitHubͷWebhookΛઃఆ͢ΔػೳͳͲ͋Δ
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ࣗ࡞Ingress controller cert-manager cert-manager heimdallr operator proxy
etcd api 自作コンポーネント OSSコンポーネント
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ࣗ࡞Controller܊ • ӡ༻ͷॿ͚ʹͳΔίϯτϩʔϥΛ͍͔ͭࣗ͘࡞ • MinIOͷόέοτΛཧ͢ΔίϯτϩʔϥͳͲ • ίϯτϩʔϥ·ͱΊͯϚωʔδϟͱͯ͠ҰͭͷPodͰಈ࡞͍ͤͯ͞Δ
ςΩετ൛ 👉 https://bit.ly/f110-homecluster όοΫΞοϓ • γϯϓϧʹetcdͷεφοϓγϣοτΛऔಘ͢ΔͷΈ • อଘઌGoogle Cloud Storage
• ετϨʔδͷσʔλఘΊΔ • όοΫΞοϓͷϓϩάϥϜࣗ࡞ • CronJobͰ3ִ࣌ؒؒͰ࣮ߦ • όοΫΞοϓϑΝΠϧҰिؒͷΈอ͍࣋ͯ͠Δ
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ΞϓϦέʔγϣϯ • ࣗ࡞Zero Trust Proxy • ࣗ࡞CI
• Notion༻ࣗ࡞πʔϧ • ίʔυݕࡧπʔϧ • Թܭ༻ΤΫεϙʔλʔ
ςΩετ൛ 👉 https://bit.ly/f110-homecluster ࠓޙ • L3εΠονΛಋೖͯ͠CLOSߏʹ͍ͨ͠ • ্Ґϧʔλ͕SPOFͳͷͰωοτϫʔΫͷԽΛ͍ͨ͠ • ετϨʔδͷ
• ҆ఆՔಇͰ͖ͦ͏