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
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Six Lessons from altMBA
skipperchong
26
3.5k
Why Our Code Smells
bkeepers
PRO
334
57k
It's Worth the Effort
3n
183
27k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
RailsConf 2023
tenderlove
29
880
Producing Creativity
orderedlist
PRO
341
39k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
328
21k
A designer walks into a library…
pauljervisheath
202
24k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
How GitHub (no longer) Works
holman
311
140k
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/