LoginSignup
1
2

More than 1 year has passed since last update.

Kubernetesの便利プラグインを使えるようにするkrewをインストールする

Last updated at Posted at 2021-11-11

概要

Krewは、kubectl pluginを使いやすくするツールです。

インストール

macOSの場合

brew install krew

Arch Linuxの場合

yay krew

設定

~/.zshrc~/.krew/binパスを追加。

export PATH="${PATH}:${HOME}/.krew/bin"

追加したら、source ~/.zshrc として再読み込みしておく

ctxプラグイン

複数のKubernetesクラスタを使っている場合、切り替える必要がある。その切り替えを瞬時に行えるようにするプラグイン。

インストール

kubectl krew install ctx

一覧を見る

kubectl ctx

切り替える

kubectl ctx kind

nsプラグイン

namespaceを一覧したり、切り替えたりを簡単にできるようになる。

インストール

kubectl krew install ns

一覧を見る

kubectl ns

切り替える

kubectl ns kube-system
1
2
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
1
2