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
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Unsuck your backbone
ammeep
668
57k
For a Future-Friendly Web
brad_frost
175
9.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Writing Fast Ruby
sferik
627
61k
Navigating Team Friction
lara
183
14k
It's Worth the Effort
3n
183
27k
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/