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
kindで作るローカルk8s開発環境
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kenta Shinohara
January 31, 2020
51
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
kindで作るローカルk8s開発環境
Kenta Shinohara
January 31, 2020
More Decks by Kenta Shinohara
See All by Kenta Shinohara
NFVにおけるクラウドネイティブ技術適用の挑戦
sinohara
1
1.5k
Amazon EKS上でのVNF開発奮闘記
sinohara
1
1.4k
Container Communication on lattice
sinohara
0
810
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Practical Orchestrator
shlominoach
191
11k
My Coaching Mixtape
mlcsv
0
150
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
180
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
440
RailsConf 2023
tenderlove
30
1.5k
Bash Introduction
62gerente
615
220k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
230
Mobile First: as difficult as doing things right
swwweet
225
10k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
200
Transcript
kindͰ࡞ΔϩʔΧϧk8s։ൃڥ 2020/1 @sinohara
TL;DR • kubernetesॳֶऀͷෑډ͕૬มΘΒͣߴ͍ • kinddocker͕ಈ͘ڥ͑͋͞Εkubernetes ڥ͕࡞ΕΔͷͰ͓קΊ
Kenta Shinohara @ NSݚN੍PωࣜDP • ΫϥυωΠςΟϒNFVج൫ͷݚڀɾ։ൃ • 1/31 NTT Tech
Conference #4ͰLT͠·ͨ͠ Copyright©2020 NTT Corp. All Rights Reserved. NTT Tech Conf#4 @2020/1/31 1
ຊͷ͓ɿ ϩʔΧϧk8sڥ • k8s৮ͬͨ͜ͱ͋Δਓʁ • ͓ࢼ͢͠Δʹk8sڥͬͯ ͬͺΓෑډ͕ߴ͍
ϚωʔδυαʔϏεʁ • ߏஙʹ20͔͔Δ • ߴ͍($72/݄~) • 5͘Β͍Ͱߏஙग़དྷΔ • ߴ͍($24/݄)
ϩʔΧϧ k8sʁ • minikube • hypervisorϕʔε • Virtual box, hyperkit,
parallels, vmware, etc… • 2vCPU / 2GB mem • γϯάϧϊʔυΫϥελ • master/workerಉډߏ • ͏গͪ͠ΌΜͱͨ͠ڥ͕ཉ͍͠ɾɾ
kind : kubernetes in docker • dockerίϯςφ্Ͱmulti-node clusterڥΛ ࡞Δߏஙπʔϧ
how to use kind kind-config.yml
how to use kind
kind architecure Server docker docker docker Kube-apiserver Kube-controller Kube-scheduler etcd
kube-proxy coredns Image: kindest/node:v1.17.0 kind.cluster: test kind.role: control-plane Image: kindest/node:v1.17.0 kind.cluster: test kind.role: worker Image: kindest/node:v1.17.0 kind.cluster: test kind.role: worker Kubelet kube-proxy Kubelet Kubelet kube-proxy cni: kindnet cni: kindnet cni: kindnet EPDLFS CSJEHF ίϯςφͷJQSPVUFJQUBCMFTΛཧ
ࢀߟɿπʔϧൺֱ • kind • minikube virtualbox • minikube hyperkit kind
Minikube virtualbox Minikube hyperkit Start-up time [sec] 82 133.65 141.14 CPU% 25 30 20 Memory [MiB] 622 2071 * wired down pages 2615 node Master x1 worker x2 Single node Single node environment: MacBook Pro 2017, CPU: Intel Core i5 2.3GHz, Memory: 16GB
ࢀߟɿkindnet-cni
kindΛ͑ɾɾ • dockerڥ͑͋͞Εk8sڥΛ ϩʔΧϧͰ࡞ΕΔʂ • minikubeΑΓಈ࡞͕ͯܰ͘ྔʂ • multi-nodeڥͰ༡Δʂ
None
kind architecure ;ͨͨͼ Server docker docker docker Kube-apiserver Kube-controller Kube-scheduler
etcd kube-proxy coredns Image: kindest/node:v1.17.0 kind.cluster: test kind.role: control-plane Image: kindest/node:v1.17.0 kind.cluster: test kind.role: worker Image: kindest/node:v1.17.0 kind.cluster: test kind.role: worker Kubelet kube-proxy Kubelet Kubelet kube-proxy cni: kindnet cni: kindnet cni: kindnet EPDLFS CSJEHF frontend Pod frontend Pod frontend Pod Redis-master Pod Redis-slave Pod Redis-slave Pod github/kubernetes/examples/guestbook
docker ps Kubernetes resource ϗετ͔Β1PEʹ౸ୡ͢Δܦ࿏͕ແ͍
kubefwd • https://github.com/txn2/kubefwd • kubectl port-forwardΛ·ͱΊ࣮ͯߦͯ͘͠ΕΔπʔϧ
None
None
Takeaways • kind+kubefwdΛͬͨk8s։ൃڥͷհ • ҎԼͷ੍͋Δ͚ͲେମͷέʔεOK? • kubectl port-forwardUDPඇରԠ • localͰϏϧυͨ͠ίϯςφΠϝʔδ
`kind load`ίϚϯυͰk8sίϯςφʹΠϝʔδసૹ͢Δඞཁ͋Γ