Continuing with previous post,

By default, kubectl uses default editor (which is most of the time vim or nano), you can set editor of your choice by setting the following environment variable with editor of you choice.

export KUBE_EDITOR=`code --wait`

You can edit the resource definition right before deploying whether from a file or remote link. This helps when you are deploying sample application from remote link and want to edit something before deploying.


$ kubectl create -f life.yml --edit
$ kubectl create -f https://goo.gl/Z6WMNF  --edit

To read more information about resource right from the terminal.

kubectl explain pod
kubectl explain pod.spec
kubectl explain pod.spec.containers

To check if type of the field/key, whether it is required or not

kubectl explain life --recursive

To get more useful informations like request/response body, Curl commands for equivalent kubectl commands

-v=9 CURL command
-v=8 request and response body
-v=6 method and apipath
kubectl get --raw /

Always dry run before deploying your application to avoid any consequences.

$ kubectl create configmap life --from-file=life --dry-run 

Krew is kubectl plugin manager to search/install plugins for kubectl which is quite useful

$ kubectl krew search
$ kubectl krew install <plugin>