Skip to main content
In this guide, we will walk through the process of deploying a pod within your Minikube cluster and inspecting its details using the kubectl command-line utility. This tutorial is ideal for developers and Kubernetes practitioners looking to get started with pod management in a local environment.
Ensure you have Minikube installed and a cluster running. Your kubectl should be configured to communicate with your Minikube cluster.

Creating a Pod with Nginx

A pod is the smallest deployable unit in Kubernetes. To create a pod named “nginx” using the official Nginx image from Docker Hub, execute the following command:
In this command:
  • “nginx” is both the pod name and the Docker image name.
  • The Docker image must be available on Docker Hub or any other container registry. You can also specify an image tag or a custom registry if needed.
After running the command, you should see output similar to this:
This output confirms that the pod has been created and is running:
  • READY: Indicates the container is ready.
  • RESTARTS: Shows the number of times the container has restarted.
  • AGE: Displays how long the pod has been running.

Inspecting Pod Details

To view detailed information about the pod, including labels, node assignment, and network configurations, use:
The output might look like this:
Key details include:
  • The pod is labeled with run=nginx by default.
  • It is scheduled on the Minikube node with IP address 192.168.99.100, and the pod itself has the internal IP 172.17.0.3.
  • Container-specific information such as Container ID, image details, and current state are also provided.
Below the description, you will find an events section outlining the pod’s lifecycle, which might appear as follows:
Each event provides a timestamp and message detailing stages such as scheduling, image pulling, container creation, and container start. This is crucial for troubleshooting.

Viewing Pods with Extended Information

To get additional details such as the node and internal IP address where the pod is running, use the --wide flag:
The output might be:
This display confirms that each pod in a Kubernetes cluster receives its own internal IP address. In this example, the “nginx” pod has the IP address 172.17.0.3.

Summary

This demonstration showed you how to deploy a pod using a simple command in Minikube, inspect its configuration and lifecycle events with kubectl describe, and view extended information with the --wide flag. You can also create pods using YAML definition files for more advanced configurations. For further reading, consider exploring:

Watch Video