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
52
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
820
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
210k
Skip the Path - Find Your Career Trail
mkilby
1
160
GitHub's CSS Performance
jonrohan
1033
470k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
640
Marketing to machines
jonoalderson
1
5.6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How to Ace a Technical Interview
jacobian
281
24k
Unsuck your backbone
ammeep
672
58k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.7k
Discover your Explorer Soul
emna__ayadi
2
1.2k
Color Theory Basics | Prateek | Gurzu
gurzu
0
380
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ίϯςφʹΠϝʔδసૹ͢Δඞཁ͋Γ