peter (admin) -

Verifying the Minikube Cluster and Deploying the First Application
We have created our first Kubernetes cluster using Minikube, and now it is time to verify that everything is running correctly.
In this section, we will check the cluster nodes, inspect the system Pods, review Minikube add-ons, and finally deploy our first application using Nginx.
Check the Kubernetes Nodes
The first command we can use is:
kubectl get nodes -o wide
The get nodes part asks Kubernetes to display all nodes that belong to the cluster.
The option:
-o wide
shows additional information about each node.
This includes details such as:
-
Internal IP address
-
Operating system
-
Kernel version
-
Kubernetes version
-
Container runtime
kubectl uses the kubeconfig file to determine which cluster it should communicate with and how to connect securely to the Kubernetes API server.
Minikube normally configures kubeconfig automatically.
Understanding the Node Output
The output will look similar to:
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane ... ...
NAME
The node name is normally:
minikube
This is the local Kubernetes node created by Minikube.
STATUS
The most important value is:
Ready
Ready means that Kubernetes considers the node healthy and capable of running workloads.
ROLES
You may see:
control-plane
This means the Minikube node is running the Kubernetes control-plane components.
Because Minikube normally uses a single-node cluster, the same node can also run application workloads.
AGE
The AGE column shows how long the node has existed.
VERSION
The VERSION column shows the Kubernetes version running on that node.
For example:
v1.35.0
The exact version depends on your Minikube installation.
Internal and External IP Addresses
When using:
kubectl get nodes -o wide
you will also see network information.
The INTERNAL-IP is the private IP address used by the node inside the local Kubernetes environment.
For a Minikube cluster, the EXTERNAL-IP may show:
This is completely normal.
A local Minikube node usually does not require a public external IP address.
Operating System and Container Runtime
The wide output also shows information such as:
-
Operating system
-
Kernel version
-
Container runtime
The container runtime may be displayed as something similar to:
containerd://...
depending on how Minikube created the node.
This tells us which runtime Kubernetes is using inside the Minikube node to actually run containers.
Check the Kubernetes System Pods
The next step is to inspect the Pods running inside the cluster.
Use:
kubectl get pods -A
The option:
-A
means:
Show Pods from all namespaces.
You can also write the same command as:
kubectl get pods --all-namespaces
This is useful because the Kubernetes system components are not normally located in the default namespace.
The kube-system Namespace
Many important Kubernetes components run in the:
kube-system
namespace.
Depending on the Minikube configuration, you may see Pods associated with components such as:
-
etcd
-
kube-apiserver
-
kube-controller-manager
-
kube-scheduler
-
CoreDNS
-
kube-proxy
For example:
NAMESPACE NAME READY STATUS
kube-system coredns-xxxxxxxxxx-xxxxx 1/1 Running
kube-system etcd-minikube 1/1 Running
kube-system kube-apiserver-minikube 1/1 Running
kube-system kube-controller-manager-minikube 1/1 Running
kube-system kube-scheduler-minikube 1/1 Running
Understanding READY and STATUS
The READY column may contain a value such as:
1/1
This means:
1 container ready
out of
1 container expected
The STATUS column should normally show:
Running
If the important Kubernetes system Pods are running and ready, this is a strong indication that the cluster is functioning correctly.
Check Minikube Add-ons
Minikube includes several optional features known as add-ons.
To display them, run:
minikube addons list
An add-on is an additional feature that can be enabled inside the Minikube cluster.
Examples can include:
-
Dashboard
-
Metrics server
-
Ingress
-
Storage provisioner
-
Default storage class
The exact list depends on your Minikube version.
Enabled and Disabled Add-ons
The output shows whether each add-on is enabled or disabled.
For example:
ADDON NAME STATUS
default-storageclass enabled
storage-provisioner enabled
metrics-server disabled
ingress disabled
An add-on marked:
enabled
is currently active.
An add-on marked:
disabled
is available but not currently running.
Storage Add-ons
Two commonly enabled Minikube add-ons are:
default-storageclass
storage-provisioner
These provide basic dynamic storage functionality for local Kubernetes applications.
Later, when an application requests persistent storage, the storage provisioner can help create the required volume automatically.
A simple way to think about add-ons is as a Kubernetes toolbox:
Minikube
|
+---- Storage
|
+---- Dashboard
|
+---- Metrics
|
+---- Ingress
|
+---- Other optional features
Some tools are enabled automatically, while others can be enabled when required.
Creating Our First Kubernetes Application
Now that we have confirmed the cluster is healthy, we can deploy our first application.
We will use Nginx, a lightweight and widely used web server.
Create a Deployment with:
kubectl create deployment nginx --image=nginx
This command tells Kubernetes:
-
Create a Deployment
-
Name it
nginx -
Use the
nginxcontainer image
What Is a Deployment?
A Deployment is a Kubernetes resource that manages application Pods.
Instead of manually creating and maintaining individual Pods, we define the desired state through a Deployment.
In this example, the relationship looks like:
Deployment
|
v
ReplicaSet
|
v
Pod
|
v
Nginx Container
The Deployment manages the application's desired state.
Kubernetes then creates the supporting resources required to run the application.
What Happens After the Command?
When we run:
kubectl create deployment nginx --image=nginx
kubectl sends a request to the Kubernetes API server.
The process can be simplified as:
kubectl
|
v
API Server
|
v
Deployment Created
|
v
ReplicaSet Created
|
v
Pod Created
|
v
Nginx Image Pulled
|
v
Container Started
Kubernetes handles the entire process automatically.
Check the Deployment
To see the Deployment, run:
kubectl get deployments
Immediately after creating it, you may briefly see something similar to:
NAME READY UP-TO-DATE AVAILABLE
nginx 0/1 1 0
This means Kubernetes has accepted the Deployment but the Pod is not fully ready yet.
After a short time, run the command again:
kubectl get deployments
You should eventually see:
NAME READY UP-TO-DATE AVAILABLE
nginx 1/1 1 1
The value:
1/1
means that one replica was requested and one replica is ready.
Check the Pod
Now inspect the Pod created by the Deployment:
kubectl get pods
You should see something similar to:
NAME READY STATUS RESTARTS AGE
nginx-xxxxxxxxxx-xxxxx 1/1 Running 0 ...
The Pod name includes additional automatically generated characters because Kubernetes creates it as part of the Deployment.
View More Pod Information
To display additional information, run:
kubectl get pods -o wide
This shows extra details such as:
-
Pod IP address
-
Node name
-
Readiness status
For example:
NAME READY STATUS IP NODE
nginx-xxxxxxxxxx-xxxxx 1/1 Running 10.x.x.x minikube
The Pod's IP address is an internal cluster address.
The NODE column confirms that the Pod is running on the Minikube node.
What Is a Pod?
A Pod is the smallest deployable unit in Kubernetes.
A Pod contains one or more containers that run together.
In our example:
Minikube Node
|
v
Pod
|
v
Nginx Container
Our Deployment requested an Nginx application.
Kubernetes created a Pod, and that Pod runs the Nginx container.
Why Use Nginx?
Nginx is commonly used in Kubernetes tutorials because it is:
-
Small
-
Fast to download
-
Quick to start
-
Easy to test
-
Widely understood
-
Suitable as a simple web server
It provides an easy way to confirm that the cluster can successfully download an image and run an application container.
Understanding the Full Process
The complete process we have performed looks like this:
Verify Node
|
v
kubectl get nodes -o wide
|
v
Verify System Pods
|
v
kubectl get pods -A
|
v
Check Minikube Add-ons
|
v
minikube addons list
|
v
Create Deployment
|
v
kubectl create deployment nginx --image=nginx
|
v
Deployment
|
v
ReplicaSet
|
v
Pod
|
v
Nginx Container
Useful Commands from This Section
Check nodes:
kubectl get nodes
Check detailed node information:
kubectl get nodes -o wide
View all Pods across all namespaces:
kubectl get pods -A
View Minikube add-ons:
minikube addons list
Create the Nginx Deployment:
kubectl create deployment nginx --image=nginx
Check Deployments:
kubectl get deployments
Check Pods:
kubectl get pods
View detailed Pod information:
kubectl get pods -o wide
Cluster Verification Complete
At this point, we have confirmed that:
-
The Minikube node is running and shows
Ready. -
Kubernetes system Pods are running.
-
kubectl can successfully communicate with the cluster.
-
Minikube add-ons are available.
-
Kubernetes can create a Deployment.
-
Kubernetes can automatically create a Pod.
-
The Nginx container starts successfully.
This confirms that our local Kubernetes environment is working correctly and is capable of running real applications.
We now have our first application running inside Kubernetes.
Comments (0)
There are no comments yet. Be the first to comment.
Log in or register to leave a comment. all comments are subject to admin approval