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
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
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
240
How to train your dragon (web standard)
notwaldorf
97
6.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Un-Boring Meetings
codingconduct
0
310
Claude Code のすすめ
schroneko
67
230k
Git: the NoSQL Database
bkeepers
PRO
432
67k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
390
Docker and Python
trallard
47
3.9k
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ίϯςφʹΠϝʔδసૹ͢Δඞཁ͋Γ