Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Microk8s kubectl alias

I am new to microk8s, it’s a wonderful and easy approach to setup k8s, just one thing which is quite annoying which is to use microk8s everytime before the kubectl command, is there any way to use kubectl directly or make it a alias.

For eg to run kubectl command, I’ve to use microk8s everytime ==> microk8s kubectl get pods

Thanks!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Yeah, there is a way to create an alias for kubectl in microk8s,
run this command

sudo snap alias microk8s.kubectl kubectl

and you will be able to use kubectl directly.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading