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
Docker/Kubernetes社内勉強会#1 公開資料 / Study basic of ...
Search
Kohei Ota
August 16, 2019
Technology
20
29k
Docker/Kubernetes社内勉強会#1 公開資料 / Study basic of Docker and Kubernetes
Kohei Ota
August 16, 2019
Tweet
Share
More Decks by Kohei Ota
See All by Kohei Ota
CloudNative Meets WebAssembly: Exploring Wasm's Potential to Replace Containers
inductor
3
2k
The Cloud Native Chronicles: 10 Years of Community Growth Inside and Outside Japan
inductor
0
110
Cracking the KubeCon CfP
inductor
2
490
KubeCon Recap -Platform migration at Scale-
inductor
1
950
コンテナビルド最新事情 2022年度版 / Container Build 2022
inductor
3
450
データベースとストレージのレプリケーション入門 / Intro-of-database-and-storage-replication
inductor
26
6.1k
KubeConのケーススタディから振り返る、Platform for Platforms のあり方と その実践 / Lessons from KubeCon case studies: Platform for Platforms and its practice
inductor
3
780
オンラインの技術カンファレンスを安定稼働させるための取り組み / SRE activity for online conference platform
inductor
1
1.2k
Kubernetesネットワーキング初級者脱出ガイド / Kubernetes networking beginner's guide
inductor
19
6k
Other Decks in Technology
See All in Technology
20250116_JAWS_Osaka
takuyay0ne
2
200
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
12k
今年一年で頑張ること / What I will do my best this year
pauli
1
220
When Windows Meets Kubernetes…
pichuang
0
300
あなたの知らないクラフトビールの世界
miura55
0
120
メールヘッダーを見てみよう
hinono
0
100
embedパッケージを深掘りする / Deep Dive into embed Package in Go
task4233
1
210
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
7
6.4k
re:Invent 2024のふりかえり
beli68
0
110
カップ麺の待ち時間(3分)でわかるPartyRockアップデート
ryutakondo
0
140
Evolving Architecture
rainerhahnekamp
3
250
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
360
Featured
See All Featured
BBQ
matthewcrist
85
9.4k
A better future with KSS
kneath
238
17k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Designing Experiences People Love
moore
139
23k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Adopting Sorbet at Scale
ufuk
74
9.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Building an army of robots
kneath
302
45k
Site-Speed That Sticks
csswizardry
3
270
Practical Orchestrator
shlominoach
186
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
RailsConf 2023
tenderlove
29
970
Transcript
ࣾϓϩδΣΫτ ษڧձ %PDLFS,VCFSOFUFT͜ͱ͡Ί ࣾϓϩδΣΫτ ษڧձ גࣜձࣾ;0;0ςΫϊϩδʔζ ։ൃ෦
.-0QTνʔϜ ଠా ߤฏ $PQZSJHIU;0;05FDIOPMPHJFT *OD
;0;05FDIOPMPHJFT *OD ˔%PDLFSͷ͓͞Β͍ ˔%PDLFSίϯςφͱ%PDLFSΠϝʔδ ˔%PDLFSͰղܾͰ͖Δ͜ͱɾղܾͰ͖ͳ͍͜ͱ ˔ίϯςφɾΦʔέετϨʔγϣϯͷجૅ ˔,VCFSOFUFTͷΞʔΩςΫνϟ֓ཁ ΞδΣϯμ 2
;0;05FDIOPMPHJFT *OD ˔%PDLFSͷ͓͞Β͍ ˔%PDLFSίϯςφͱ%PDLFSΠϝʔδ ˔%PDLFSͰղܾͰ͖Δ͜ͱɾղܾͰ͖ͳ͍͜ͱ ˔ίϯςφɾΦʔέετϨʔγϣϯͷجૅ ˔,VCFSOFUFTͷΞʔΩςΫνϟ֓ཁ ΞδΣϯμ 3
;0;05FDIOPMPHJFT *OD ˔EPU$MPVEࣾ %PDLFSࣾͷલ ͕ࣗࣾͷ1BB4 1MBUGPSN BTB4FSWJDF Λ࡞ΔͨΊʹ։ൃͨ͠ίϯςφܕԾԽ ͷΞϓϦέʔγϣϯ࣮ߦج൫ ˔طଘͷ7.ܕԾԽʹൺɺىಈ͕ඇৗʹߴ
%PDLFSͷ͓͞Β͍ 4
;0;05FDIOPMPHJFT *OD ˔ίϯςφܕԾԽʁ ˓ίϯςφͱ ˙ΞϓϦέʔγϣϯͷ࣮ߦʹඞཁͳڥΛ Ұͭͷύοέʔδʹ·ͱΊͨԾతͳ୯Ґ ˔04ΑΓԼͷϨΠϠΛʮ-JOVYΧʔωϧʯΛͬͯ ࠶ݱ͢ΔԾԽٕज़ %PDLFSͷ͓͞Β͍ 5
(Go/Java/Ruby...)
;0;05FDIOPMPHJFT *OD -JOVY,FSOFM %PDLFS&OHJOF JT ! 6
;0;05FDIOPMPHJFT *OD ˔%PDLFSͷ͓͞Β͍ ˔%PDLFSίϯςφͱ%PDLFSΠϝʔδ ˔%PDLFSͰղܾͰ͖Δ͜ͱɾղܾͰ͖ͳ͍͜ͱ ˔ίϯςφΦʔέετϨʔγϣϯͷجૅ ˔,VCFSOFUFTͷΞʔΩςΫνϟ֓ཁ ΞδΣϯμ 7
;0;05FDIOPMPHJFT *OD ˔%PDLFS্Ͱʮ͜͏͍͏ৼΔ͍Λ͢Δʯͱ͍͏ఆٛ ˔%PDLFSGJMFΛॻ͘ˠϏϧυ͢Δ %PDLFSΠϝʔδ ˓࣮ଶUBSܗࣜͰ·ͱΊͨΞʔΧΠϒϑΝΠϧ ˔͜ͷ࣌Ͱ·࣮ͩࡍʹಈ࡞͍ͯ͠ΔΘ͚Ͱͳ͍ %PDLFSΠϝʔδͱ 8 Dockerfile
docker build Docker
;0;05FDIOPMPHJFT *OD ˔%PDLFSϗετͷ্Ͱ࣮ࡍʹಈ࡞͢Δϓϩηε ˔ίϯςφΛ্ཱͪ͛ΔͨΊʹɺϕʔεͱͳΔ %PDLFSΠϝʔδ͕ඞཁ %PDLFSίϯςφͱ 9 Docker Docker
Docker Docker docker run
;0;05FDIOPMPHJFT *OD ˔ݴ͍͑ΔͱɺԼهΛ࣮ߦͨ͠ͷ͕ίϯςφʹͳΔ ˓%PDLFSGJMF͔Β࡞ͨ͠खݩͷΠϝʔδ ˓࡞ࡁΈͷ֎෦ΠϝʔδΛϨδετϦ͔Βऔಘ %PDLFSίϯςφͱ 10 Docker Docker
Docker Docker docker run
;0;05FDIOPMPHJFT *OD ˔%PDLFSGJMF͔ΒΠϝʔδΛϏϧυ ˔Ϗϧυͨ͠ΠϝʔδΛϨδετϦʹ1VTI ˔ಈ͔͍ͨ͠ڥͰΠϝʔδΛ1VMM͠ɺίϯςφΛىಈ ˔͜ͷྲྀΕΛ·ͱΊͯʮ#VJME 4IBSF 3VOʯͱݺͿ #VJME 4IBSF
3VO 11 Dockerfile docker build Docker Docker docker run
;0;05FDIOPMPHJFT *OD %PDLFSΠϝʔδ͕ͦͷ·· ʮΰʔϧσϯΠϝʔδʯͱͳΔͨΊɺ ϥΠϒϥϦݴޠϥϯλΠϜͷ όʔδϣϯࠩҟ͕ੜ·Εʹ͍͘ 12
;0;05FDIOPMPHJFT *OD ˔%PDLFSͷ͓͞Β͍ ˔%PDLFSίϯςφͱ%PDLFSΠϝʔδ ˔%PDLFSͰղܾͰ͖Δ͜ͱɾղܾͰ͖ͳ͍͜ͱ ˔ίϯςφΦʔέετϨʔγϣϯͷجૅ ˔,VCFSOFUFTͷΞʔΩςΫνϟ֓ཁ ΞδΣϯμ 13
;0;05FDIOPMPHJFT *OD ˔%PDLFSͰղܾͰ͖Δ͜ͱ ˓શڥͷڞ௨Խ ˙ϚϧνΫϥυԽʹ͓͚Δύοέʔδϯάච಄ީิ ˙ΫϥυɾΦϯϓϨ্ͱ։ൃڥͱͷࠩҟΛzݮΒ͢z ˓ߴͳΞϓϦέʔγϣϯ৴ɾσϓϩΠ ˓$*ͳͲʹΑΔࣗಈԽਪਐ ˙ςετಉҰڥͰ࣮ߦՄ %PDLFSۜͷؙͰͳ͍
14
;0;05FDIOPMPHJFT *OD ˔%PDLFS͕ۤखͳ͜ͱ ˓ϞϊϦγοΫͳΞϓϦέʔγϣϯͷཧ ˙%#ͳͲͷεςʔτͷཧͱ͔ۤख ˠ5IF5XFMWF'BDUPS"QQ ˠ$MPVE/BUJWF5SBJM.BQ %PDLFSۜͷؙͰͳ͍ 15
;0;05FDIOPMPHJFT *OD ˔%PDLFSͰղܾͰ͖ͳ͍͜ͱ ˓ΞϓϦέʔγϣϯͷੈཧ ˓ࣗಈεέʔϦϯά ˓ॊೈͳϦιʔεཧ ˓ϩΪϯάɺࢹ %PDLFSۜͷؙͰͳ͍ 16
;0;05FDIOPMPHJFT *OD %PDLFSΛຊ൪ڥͰ ಈ͔͢ʹ͍͔ͭ͘ͷ՝͕͋Δ 17
;0;05FDIOPMPHJFT *OD ˔%PDLFSͷ͓͞Β͍ ˔%PDLFSίϯςφͱ%PDLFSΠϝʔδ ˔%PDLFSͰղܾͰ͖Δ͜ͱɾղܾͰ͖ͳ͍͜ͱ ˔ίϯςφΦʔέετϨʔγϣϯͷجૅ ˔,VCFSOFUFTͷΞʔΩςΫνϟ֓ཁ ΞδΣϯμ 18
;0;05FDIOPMPHJFT *OD ˔ຊ൪ڥͰෳͷίϯςφΛಈ͔͢͜ͱ͕Ұൠత ˓Մ༻ੑোੑΛ্͛ΔͨΊ ˓ࣗಈεέʔϦϯάɺϩʔυόϥϯγϯάɺࣗݾ෮چʑ ˔֤ίϯςφಠཱ͓ͯ͠Γɺ͓ޓ͍Λೝࣝ͠ͳ͍ͨΊ ԿΒ͔ͷཧϨΠϠ͕ඞཁʹͳΔ ˠΦʔέετϨʔγϣϯπʔϧΛೖΕΔ ΦʔέετϨʔγϣϯʁʁ 19
;0;05FDIOPMPHJFT *OD ˔%PDLFSίϯςφΞϓϦέʔγϣϯ։ൃʹ͓͍ͯ ैདྷ՝ͱͳ͍͍͔ͬͯͨͭ͘ͷΛղফͯ͘͠ΕΔ ˔%PDLFS୯ମͰຊ൪ӡ༻ʹඞཁͳཧ༻ͷػೳ͕ෆ ͍ͯ͠ΔͨΊɺಋೖʹ͕͋Δ ˔ͦΕΒΛղܾ͢ΔʹɺίϯςφΦʔέετϨʔγϣ ϯ͕ඞཁ ͜͜·Ͱͷ·ͱΊ 20
;0;05FDIOPMPHJFT *OD ˔%PDLFSͷ͓͞Β͍ ˔%PDLFSίϯςφͱ%PDLFSΠϝʔδ ˔%PDLFSͰղܾͰ͖Δ͜ͱɾղܾͰ͖ͳ͍͜ͱ ˔ίϯςφΦʔέετϨʔγϣϯͷجૅ ˔,VCFSOFUFTͷΞʔΩςΫνϟ֓ཁ ΞδΣϯμ 21
;0;05FDIOPMPHJFT *OD ˔,VCFSOFUFTίϯςφΦʔέετϨʔγϣϯπʔϧͷ ʮσϑΝΫτελϯμʔυʯ ,VCFSOFUFTʁ 22
;0;05FDIOPMPHJFT *OD 23
;0;05FDIOPMPHJFT *OD ˔ίϯςφ 1PE Λத৺ͱͨ͠ࢄγεςϜ ˓ϫʔΫϩʔυ͕ৗʹʮ͋Δ͖ঢ়ଶʯΛอͭΑ͏ಈ͘ ,VCFSOFUFTͷ֓ཁ 24 Ref: https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/
;0;05FDIOPMPHJFT *OD :".-ʹΑΔߏཧ 25
;0;05FDIOPMPHJFT *OD ˔ίϯςφͷઃఆ ˓ϕʔεΠϝʔδɺόʔδϣϯɺϙʔτ ˔ཁٻ͢Δ$16ϝϞϦͳͲͷϦιʔε ˔ϔϧενΣοΫ ˔ڥม ˔ࣗಈεέʔϧͷεέʔϧΠϯΞτͷ݅ :".-ʹΑΔએݴతͳઃఆ 26
;0;05FDIOPMPHJFT *OD ˔ίϯςφͷઃఆ ˓ϕʔεΠϝʔδɺόʔδϣϯɺϙʔτ ˔ཁٻ͢Δ$16ϝϞϦͳͲͷϦιʔε ˔ϔϧενΣοΫ ˔ڥม ˔ࣗಈεέʔϧͷεέʔϧΠϯΞτͷ݅ :".-ʹΑΔએݴతͳઃఆ 27
;0;05FDIOPMPHJFT *OD 28
;0;05FDIOPMPHJFT *OD ,VCFSOFUFTͷϦιʔε جຊฤ 29
;0;05FDIOPMPHJFT *OD ˔Ϧιʔεͱ ˓,VCFSOFUFTʹ͓͚Δجຊతͳίϯϙʔωϯτͷ୯Ґ ˔,VCFSOFUFT͕ѻ͏શͯͷந֓೦Ϧιʔε ˓1PE ˓/PEF ˓$POGJH.BQFUD ,VCFSOFUFTͱϦιʔε 30
;0;05FDIOPMPHJFT *OD ˔,VCFSOFUFTϦιʔε:".-Ͱهड़͞ΕɺఆٛͰ͖Δ ˔͜͜ͰΞϓϦέʔγϣϯ։ൃऀʹ͓͍ͬͯͯΒ͍ ͍ͨͷΛத৺ʹհ͠·͢ Ϧιʔεͱ:".- 31
;0;05FDIOPMPHJFT *OD ˔ίϯςφΛಈ͔ͨ͢Ίͷ࠷খ͔ͭجຊ୯Ґ ˓ίϯςφͷجຊઃఆʢΠϝʔδछผʣ ˓Ϧιʔε੍ݶ ˓ϘϦϡʔϜ ͳͲͷఆٛΛઃఆՄೳ 1PEϦιʔε 32
;0;05FDIOPMPHJFT *OD 33 Image credit: https://cstoku.dev/
;0;05FDIOPMPHJFT *OD ˔1PEΛෳ͢ΔϦιʔε ˔͜Ε͕ࣗίϯςφΛಈ͔͢ͷͰͳ͘ɺ1PEΛࢦఆ͠ ͚ͨͩ࡞ͯͦ͠ΕΛཧ͢Δ1PE.BOBHFSͷׂ 3FQMJDB4FUϦιʔε 34
;0;05FDIOPMPHJFT *OD 35 Image credit: https://cstoku.dev/
;0;05FDIOPMPHJFT *OD ˔࣮ӡ༻ͰίϯςφΛಈ͔͢ͳΒ͜Ε ˔3FQMJDB4FUͷػೳʹՃ͑ɺίϯςφͷΞοϓσʔτઓུ όʔδϣϯཤྺͳͲΛཧ͢ΔػೳΛ࣋ͭ %FQMPZNFOUϦιʔε 36
;0;05FDIOPMPHJFT *OD 37 % ! ) "'
$(&+ *# Image credit: https://cstoku.dev/
;0;05FDIOPMPHJFT *OD ˔$POGJH.BQ,FZ7BMVFͳจࣈྻΛѻ͏Ϧιʔε ˔ྫ͑ҎԼͷΑ͏ͳใΛ1PEʹೖ͍ͨ͠߹ʹ͏ ˓/HJOY3BJMTͳͲͷ$POGJHϑΝΠϧ ˙Θ͟Θ͟ϘϦϡʔϜϚϯτ͢Δ·Ͱͳ͍ͷ ˓ڥม $POGJH.BQϦιʔε 38
;0;05FDIOPMPHJFT *OD 39 4FSWJDFɺ*OHSFTTͳͲͷϦιʔεॏཁͰ͕͢ɺ ࠓճίϯςφͷಈ࡞·ΘΓʹϑΥʔΧε͍ͯ͠ ΔͨΊઆ໌ΛׂѪ͍ͯ͠·͢
;0;05FDIOPMPHJFT *OD :".-ߏཧʹΑΔքͷมԽ 40 VM
SSH Git push VM
;0;05FDIOPMPHJFT *OD 41 VM
SSH Git push VM :".-ߏཧʹΑΔքͷมԽ
;0;05FDIOPMPHJFT *OD ։ൃεΩʔϚͷมԽͱ %FW0QT 42 ˔։ൃͱΠϯϑϥͷ֞ࠜͷϥΠϯ͕มΘΔ ˓ΞϓϦଆͰߏͷมߋΛՃ͑ΒΕΔൣғ͕૿͑Δ ˔%FW0QTͷઢҾΛܾΊΔͷϓϩμΫταʔϏεʹ ؔΘΔΤϯδχΞࣗ
;0;05FDIOPMPHJFT *OD 43 8JOEPXTͷαϙʔτʁ
;0;05FDIOPMPHJFT *OD 44
;0;05FDIOPMPHJFT *OD 45 ,VCFSOFUFT͔Β 1SPEVDUJPOMFWFMͷ 8JOEPXTαϙʔτ͕։࢝͞Ε·ͨ͠ʂ ࠓͷ࠷৽
;0;05FDIOPMPHJFT *OD ˞8JOEPXTίϯςφͬͨ͜ͱ͕ ͳ͍ͷͰΑ͘Θ͔Γ·ͤΜ 46
;0;05FDIOPMPHJFT *OD ˔%PDLFSίϯςφΞϓϦέʔγϣϯ։ൃʹ͓͍ͯ ैདྷ՝ͱͳ͍͍͔ͬͯͨͭ͘ͷΛղফͯ͘͠ΕΔ ˔%PDLFS୯ମͰຊ൪ӡ༻ʹඞཁͳཧ༻ͷػೳ͕ෆ ͍ͯ͠ΔͨΊɺίϯςφΦʔέετϨʔγϣϯ͕ඞཁ ˓,VCFSOFUFTͦͷڥΛఏڙͯ͘͠ΕΔͭͷखஈ ·ͱΊ 47
;0;05FDIOPMPHJFT *OD ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ 48
None