26 Aug, 2023 - About 2 minutes
Local Kubernetes for Testing/Developing
Intro
minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes.
Lets start by installing the minikube package.
NOTE: This example is targeting a Arch distribution, if you use a different linux flavor check the Official Docs for other install options
sudo pacman -S minikube |
The following command will setup a docker environment with a kubernetes environment that you can use for development/testing purposes
minikube start |
In order to interact with Kubernetes one can use the provided kubectl command upon starting this environment with the following command
minikube kubectl -- get pods -A |
One should get something like this
NAMESPACE NAME READY STATUS RESTARTS AGE |
I will install kubectl package however to allow interaction with other clusters if required.
sudo pacman -S kubectl |
We should get the same output by executing
kubectl get po -A |
One can check the cluster details with following command
kubectl cluster-info |
You should get something similar
Kubernetes control plane is running at https://192.168.49.2:8443 |
Minikube is also bundled with Kubernetes Dashboard which you can launch with the following command
minikube dashboard |
You would get something similar to the following image:
Great now we have a Kubernetes cluster running in docker and kubectl command available.
For a more extensive guideline on how to manage Minikube please checkout the handbook
Next steps would containerize some application and deploy it.
But that would be for another article…