Kubectl Plugins and Krew: Difference between revisions
Jump to navigation
Jump to search
DrEdWilliams (talk | contribs) (Created page with "[https://krew.sigs.k8s.io/ Krew] helps you discover and install kubectl plugins on your machine. There are a lot of kubectl plugins you can install and use to enhance your Ku...") |
DrEdWilliams (talk | contribs) mNo edit summary |
||
| Line 5: | Line 5: | ||
Let’s get started: | Let’s get started: | ||
1. Install and set up Krew on your machine. | 1. Install and set up Krew on your machine and add krew's bin directory to your path | ||
( | |||
set -x; cd "$(mktemp -d)" && | |||
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.{tar.gz,yaml}" && | |||
tar zxvf krew.tar.gz && | |||
KREW=./krew-"$(uname | tr '[:upper:]' '[:lower:]')_amd64" && | |||
"$KREW" install --manifest=krew.yaml --archive=krew.tar.gz && | |||
"$KREW" update | |||
) | |||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" | |||
2. Download the plugin list: | 2. Download the plugin list: | ||
Revision as of 14:27, 12 July 2020
Krew helps you discover and install kubectl plugins on your machine.
There are a lot of kubectl plugins you can install and use to enhance your Kubernetes experience.
Let’s get started:
1. Install and set up Krew on your machine and add krew's bin directory to your path
( set -x; cd "$(mktemp -d)" && curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.{tar.gz,yaml}" && tar zxvf krew.tar.gz && KREW=./krew-"$(uname | tr '[:upper:]' '[:lower:]')_amd64" && "$KREW" install --manifest=krew.yaml --archive=krew.tar.gz && "$KREW" update )
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
2. Download the plugin list:
kubectl krew update
3. Discover plugins available on Krew:
kubectl krew search NAME DESCRIPTION INSTALLED access-matrix Show an RBAC access matrix for server resources no advise-psp Suggests PodSecurityPolicies for cluster. no auth-proxy Authentication proxy to a pod or service no [...]
4. Choose a plugin from the list and install it:
kubectl krew install access-matrix
5. Use the installed plugin:
kubectl access-matrix
6. Keep your plugins up-to-date:
kubectl krew upgrade
7. Uninstall a plugin you no longer use:
kubectl krew uninstall access-matrix
This is pretty much all you need to know as a user to use Krew.
(copied from https://krew.sigs.k8s.io/docs/user-guide/quickstart/)