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
KubernetesでCLIを快適を使いたい
Search
Show Murai
November 15, 2017
0
2k
KubernetesでCLIを快適を使いたい
Show Murai
November 15, 2017
Tweet
Share
More Decks by Show Murai
See All by Show Murai
システムを構築するときに 気をつける10のこと
showmurai
4
140
監視入門!監視で困ってませんか?
showmurai
0
300
AWS vs GCP 今から作るならどちらがいいの 20180330
showmurai
1
1.3k
システムを構築するときに 気をつける10のこと
showmurai
0
1.5k
AWS vs GCP 今から作る ならどっちがいいの!?
showmurai
52
83k
データサイエンスのためのAWSの使い方入門
showmurai
1
930
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
A better future with KSS
kneath
238
17k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Scaling GitHub
holman
458
140k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Navigating Team Friction
lara
183
14k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
The Invisible Side of Design
smashingmag
297
50k
Writing Fast Ruby
sferik
626
61k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Transcript
KubernetesͰCLIΛշదΛ͍͍ͨ αΠόʔΤʔδΣϯτͱ͘͞ΒΠϯλʔωοτͷΠϯϑϥஊٛ αΠόʔΤʔδΣϯτ ΞυςΫελδΦ ଜҪ ᠳଠ࿕ https://connpass.com/event/70903/
ࣗݾհ • ଜҪ ᠳଠ࿕ • @Show_murai • גࣜձࣾαΠόʔΤʔδΣϯτ ΞυςΫελδΦ ΠϯϑϥνʔϜ
Πϯϑϥ ϦʔυΤϯδχΞ ※ຊͷൃදݸਓͷݟղͰ͋Γɺॴଐ͢Δ৫ͷެࣜݟղͰ͋Γ·ͤΜ
ࣗݾհ • ژग़ • αΠόʔΤʔδΣϯτ த్ೖࣾ • ϓϩμΫτ(ϓϩδΣΫτ)͖ͷΠϯϑϥ • झຯཱྀߦɺϑοταϧ
• ࢂഊ͠·ͨ͠
Kubernetes(k8s) ͬͯ·͔͢!?
࠷͍ۙ࢝Ί·ͨ͠
KubernetesΛͬͱ ศརʹͯ͘͠ΕΔcliπʔϧͷհ
context/nemespace ΛΓସ͍͑ͨ
kubectx
kubectxͷศརͳͱ͜Ζ • MacͳΒbrewͰҰൃΠϯετʔϧ • contextͷrename͕Ͱ͖Δ • ิͰcontext/nsͷϦετͳΜͯݟͳ͍͍ͯ͘
contextͷΓସ͑
namespaceͷΓସ͑
ͪͳΈʹ
ShellʹCurrentͷ context/namespaceΛදࣔ͢Δ
zsh-kubectl-prompt
zshʹදࣔͤ͞Δ • ΦϖϛεΛ͙ͷʹॏཁ • brewͰҰൃΠϯετʔϧ • zshrcʹઃఆΛՃ ͜Εˠ
ίϯςφϩά؆୯ʹݟ͍ͨ
stern
kubectl get pods kubectl logs -f PODS ·ͩͬͯ·͔͢ʁ
stern PODS ͜ΕͰͰ͖·͢
sternͷ͕࠷ߴͳͱ͜Ζ • “stern KEYWORD” ͢Δ͚ͩ • ݕࡧ͍ͨ͠ϫʔυΛೖΕΔ͚ͩ (શҰக͡Όͳͯ͘Α͍ • Podຖʹ৭͚͞Εͯͯݟ͍͢
• ϒϩάͰେઈࢍ • kubernetes͍શһ stern Λಋೖ͖͢
͋Γ͕ͱ͏͍͟͝·ͨ͠
Kubernetes Γ͍ͨͻͱ ϚδͰઈࢍืूத ※ΦϑΟεݟֶ͚ͩͰେৎͰ͢ αΠόʔΤʔδΣϯτ ΞυςΫελδΦ https://adtech.cyberagent.io/