LoginSignup
132
107

More than 3 years have passed since last update.

k9s で k8s Surfing (kubectl には戻れない)

Last updated at Posted at 2019-11-12

本日(2019-11-12)、下記記事を読ませてもらった勢いで書く。

インストール (Mac)

brew install derailed/k9s/k9s

実行

k9s
  • 終了する時は :q

k9s

k9s-01.png

  • とりあえず以下の手順を試す。
    1. :ns 打つと namespace 一覧。
    2. j で、namespace を選んで、 return で、namespace 内の pods 一覧。
    3. :svc 打つと、選んだ namespace 内の service 一覧。
    4. 画面下部に View (<pods> <ns> <po> <svc>) が並んでいる。view のひとつ前に戻る時は p
      • return で潜っていった時は、 esc で抜ける。
    5. control+a で、エイリアスが確認できる。
    6. ? でヘルプ。
  • 何か選んで y で、yaml が見れる。
  • 何か選んで e で、yaml が編集できる。
  • 何か選んで l で、ログが見れる。
  • namespace を渡り歩いていると、01234、のように数字でアクセスできる namespace が増えていく。

そして何と言っても Port Forwards

  • Service からでも、直で Pod でも、Pod View に入り込んだら shift+f で、ポート選択のダイアログが出る。
  • ダイアログ上は、 tab で移動。必要であればポートを編集して OK で return
  • :pf すると Port Forwards 一覧。
    • 終了する時は、 control+d で削除。たぶん。

image.png

まとめ

やばい、便利すぎる。

132
107
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
132
107