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
How to train your dragon (web standard)
notwaldorf
88
5.7k
Statistics for Hackers
jakevdp
796
220k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Docker and Python
trallard
40
3.1k
Building Applications with DynamoDB
mza
90
6.1k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Making Projects Easy
brettharned
115
5.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Designing the Hi-DPI Web
ddemaree
280
34k
Typedesign – Prime Four
hannesfritz
40
2.4k
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/