Slide 1

Slide 1 text

KubernetesͰCLIΛշదΛ࢖͍͍ͨ αΠόʔΤʔδΣϯτͱ͘͞ΒΠϯλʔωοτͷΠϯϑϥஊٛ αΠόʔΤʔδΣϯτ ΞυςΫελδΦ ଜҪ ᠳଠ࿕ https://connpass.com/event/70903/

Slide 2

Slide 2 text

ࣗݾ঺հ • ଜҪ ᠳଠ࿕ • @Show_murai • גࣜձࣾαΠόʔΤʔδΣϯτ
 ΞυςΫελδΦ ΠϯϑϥνʔϜ
 Πϯϑϥ ϦʔυΤϯδχΞ ※ຊ೔ͷൃද͸ݸਓͷݟղͰ͋Γɺॴଐ͢Δ૊৫ͷެࣜݟղͰ͸͋Γ·ͤΜ

Slide 3

Slide 3 text

ࣗݾ঺հ • ژ౎ग़਎ • αΠόʔΤʔδΣϯτ த్ೖࣾ • ϓϩμΫτ(ϓϩδΣΫτ)෇͖ͷΠϯϑϥ԰ • झຯ͸ཱྀߦɺϑοταϧ • ࢂഊ͠·ͨ͠

Slide 4

Slide 4 text

Kubernetes(k8s) ࢖ͬͯ·͔͢!?

Slide 5

Slide 5 text

࠷ۙ࢖͍࢝Ί·ͨ͠

Slide 6

Slide 6 text

KubernetesΛ΋ͬͱ ศརʹͯ͘͠ΕΔcliπʔϧͷ঺հ

Slide 7

Slide 7 text

context/nemespace Λ੾Γସ͍͑ͨ

Slide 8

Slide 8 text

kubectx

Slide 9

Slide 9 text

kubectxͷศརͳͱ͜Ζ • MacͳΒbrewͰҰൃΠϯετʔϧ • contextͷrename͕Ͱ͖Δ • ิ׬Ͱcontext/nsͷϦετͳΜͯݟͳ͍͍ͯ͘

Slide 10

Slide 10 text

contextͷ੾Γସ͑

Slide 11

Slide 11 text

namespaceͷ੾Γସ͑

Slide 12

Slide 12 text

ͪͳΈʹ

Slide 13

Slide 13 text

ShellʹCurrentͷ context/namespaceΛදࣔ͢Δ

Slide 14

Slide 14 text

zsh-kubectl-prompt

Slide 15

Slide 15 text

zshʹදࣔͤ͞Δ • ΦϖϛεΛ๷͙ͷʹॏཁ • brewͰҰൃΠϯετʔϧ • zshrcʹઃఆΛ௥Ճ ͜Εˠ

Slide 16

Slide 16 text

ίϯςφϩά؆୯ʹݟ͍ͨ

Slide 17

Slide 17 text

stern

Slide 18

Slide 18 text

kubectl get pods kubectl logs -f PODS ·ͩ΍ͬͯ·͔͢ʁ

Slide 19

Slide 19 text

stern PODS ͜ΕͰͰ͖·͢

Slide 20

Slide 20 text

sternͷ͕࠷ߴͳͱ͜Ζ • “stern KEYWORD” ͢Δ͚ͩ • ݕࡧ͍ͨ͠ϫʔυΛೖΕΔ͚ͩ
 (׬શҰக͡Όͳͯ͘Α͍ • Podຖʹ৭෼͚͞Εͯͯݟ΍͍͢ • ϒϩάͰ΋େઈࢍ • kubernetes࢖͍͸શһ stern Λಋೖ͢΂͖

Slide 21

Slide 21 text

͋Γ͕ͱ͏͍͟͝·ͨ͠

Slide 22

Slide 22 text

Kubernetes ΍Γ͍ͨͻͱ ϚδͰઈࢍืूத ※ΦϑΟεݟֶ͚ͩͰ΋େৎ෉Ͱ͢ αΠόʔΤʔδΣϯτ ΞυςΫελδΦ https://adtech.cyberagent.io/