How to use Kubernetes locally?

A few words about Kubectl and Minikube

We use Kubernetes to make our life easier when we have a real product and cloud. There are a lot of reasons to use Kubernetes with clouds like AWS, GCP, or Azure. This is not the topic of this article.

The question is how to test your work before using a cloud you’ve chosen. And here Kubectl and minilube come. This stack permits to test everything on your PC.

Install Minikube and Kubectl

Install on Mac OS X

Installed both with brew throw the terminal

Error I had

If you will install kubectl before minikube and check kubectl version, you’ll see the error :

error: Missing or incomplete configuration info. Please point to an existing, complete config file

After the installation and start of minikube, the issue disappears

Kubectl works.

Kubectl configs

Kubectl configs saved in $HOME/.kube/config.

Example of my configs after the installation.

Useful commands

Minikube commands

Minikube dashboard

Kubectl commands

Deploy simple hello minikube with Kubectl

https://kubernetes.io/fr/docs/tutorials/hello-minikube/

Map Kubectl to different contexts

On the desktop docker app, it’s possible to change it directly in menu

Command Autocompletion

kubectl supports integration with your shell to enable tab completion for both commands and resources

Done

Now you are ready to work on your machine, play with K8 commands and learn everything you need without any cloud platform.

Other articles

You can also be interested in Kubernetes main terms article.

Thanks

Thank you for your attention.

LinkedIn, Twitter, https://lytvynov-anton.com

Senior web developer, architect, cryptocurrencies trader, https://lytvynov-anton.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store