Getting Started With K8s
Getting Started With K8s
This series on Kubernetes kicks off with some basic K8s setup, configuration, and commands to get your container orchestration working.
Join the DZone community and get the full member experience.Join For Free
Kubernetes, also known as K8s, is a well-known container management solution. The main advantage of Kubernetes that it is open source and production ready. The other advantage is that when there are multiple instances or deployments, they become very difficult to manage manually and require great tools like Kubernetes.
For those who are new to Kubernetes, I will be writing a series of posts as part of the Project Calico blog.
This blog will demonstrate an easy way to run Kubernetes on a Windows machine.
To start with, we need Minikube, which is a tool that makes it easy to run Kubernetes locally.
The very first thing we need to do is to download
minikube-windows-amd64 from GitHub. Then, it needs to be renamed to
We also need
kubectl.exe from here, which controls the Kubernetes cluster manager and puts it on the same path.
So, we are ready to start. We will get into the command prompt and run:
minikube start. Then, we should get the following:
So Kubernetes is ready to go on our system!
We can now run the following command to test the status —
minikube status — and should get the following:
Which shows that Minikube is ready and running, and also that kubectl is configured!
If we run the
kubectl cluster-info command, we will get the information of our cluster:
Then we run the
kubectl version command to get the client-server version of kubectl.
We can get the IP address of the cluster using the IP command,
We can start the dashboard, which is a web console, using
minikube dashboard as follows:
The dashboard will open as follows:
If we just need the dashboard URL without starting it, we can use
minikube dashboard --url=true , which will display the URL:
We can check the current deployment using
kubectl deployments, which will display
No resource found, as there is no deployment:
Let's create a new deployment from the console dashboard by clicking create on the top right:
We will fill the
test-app and pull a Docker image from DockerHub. This time, let's take a
Mule docker image and pull it from there:
If we check the dashboard, we can see the image is deployed and the
Mule runtime server has started:
We can, at last, use
kubectl delete deployments to delete a deployment and
minikube stop to stop the minikube in the system.
Thus, you can see it's very easy to use Kubernetes to manage your containers. There are lots of other things that we can do with it, which we will discuss in future articles.
Published at DZone with permission of Anirban Sen Chowdhary , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.