Extending scope of kubectl with plugins

Before diving into the topic, lets have look at few terminologies.

Kubernetes and kubectl

kubectl Plugins

# echo $PATH

Just place your executable script anywhere in your PATH and you are good to go.

How to write Plugin

Save this in kubectl-greetings and run following command to make it executable. After that move this file anywhere in you PATH with mv command.

# chmod +x kubectl-greetings

Now you are all set to run kubectl greetings command which will output Hello with username. Output of command from above script shown below

You can check all installed plugins by running following command:

# kubectl plugin list


Astrophile | Technophile | Opensource enthusiast