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
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
Java REST API Framework Comparison - PWX 2021
mraible
34
9.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
The World Runs on Bad Software
bkeepers
PRO
72
12k
How to build a perfect <img>
jonoalderson
1
5.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
A Soul's Torment
seathinner
6
3k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
First, design no harm
axbom
PRO
2
1.2k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
290
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Building AI with AI
inesmontani
PRO
1
1.1k
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ίϯςφʹΠϝʔδసૹ͢Δඞཁ͋Γ