kubectl Install
Ready to get kubectl onto your machine? You've come to the right place.
How to Install
For OSX Users
Option one: You can get kubectl on to your OSX machine with one command using Homebrew:
Option two: Feel like using curl
instead? No problem:
For Linux Users
Just input the following command:
For Windows Users
Command one, for good measure:
Or, if you prefer, you can use Chocolatey to install:
How to Use
For a deep dive into using kubectl, check out our kubectl guide.
kubectl Plugins
Ever heard of krew? It's something you can use to manage kubectl plugins.
krew is a handy tool that lets you manage kubectl plugins, sort of like apt or yum. It allows you to search for, install, and manage kubectl plugins.
Installing krew
Use the following command:
Once you've got it installed, add the krew binary to your PATH:
Then, you should be able to verify your install with a kubectl command:
How to Use krew
Before your first use, update the plugin index using the following command:
Here's how you can use krew:
After you install your plugins, you'll see a list of external tools that the plugin depends on. You'll need to install these manually.
Finally, you can use the plugin by typing kubectl <plugin-name>
:
How to Upgrade krew
Here's your command:
Further Reading
最后更新于