Ok, lets get all the persistent volume claims in our production namespace. So, the command would be:
kubectl get persistentvolumeclaims --namespace=production
Ok, the command is easy to understand, but writing such big commands in their full forms can be a pain quickly. Now image writing such big commands in the shell or powershell prompt again and again while debugging an issue.
Does it sound good?
Error debugging can quickly turn into nightmare if you have additionally take care of spellings of such big commands.
Now you would be thinking to reduce down this effort.
Thankfully we do have short identifiers for such type of common resource types.
Let me share the short identifier of above command
kubectl get pvc -n production
And if you use alias as well,
ku get pvc -n production
Isn’t this a lot better?
Here’s the complete list of shortened resource types you can use:
customresourcedefinitions= crd, crds
certificiaterequests= cr, crs
certificates= cert, certs
I hope you enjoyed this blog!