nginx to a Minikube cluster using kubectl. You’ll learn how to create the Pod, inspect its status, view detailed descriptions, and retrieve extended information. Let’s get started!
Prerequisites
- A running Minikube cluster (
minikube start) kubectlconfigured to communicate with your Minikube context- Internet access to pull the
nginximage from Docker Hub
1. Create a Pod with kubectl run
Execute the following command to launch a Pod named nginx using the official NGINX image:
nginxis both the Pod name and the container image.- You can append a tag (for example,
nginx:1.21) or a custom registry URL if needed.
2. Check Pod Status
After a moment, confirm the Pod has been created:| Column | Description |
|---|---|
| NAME | The Pod’s name (unique within its namespace). |
| READY | Number of containers ready vs. total containers. |
| STATUS | Current phase (e.g., Pending, Running). |
| RESTARTS | Count of container restarts. |
| AGE | Time elapsed since the Pod was created. |
3. Describe a Pod
To inspect detailed metadata, events, and container status:Pod networking and IP addressing will be explored in detail in a later lesson.
Events Log
Scrolling further down in the description reveals the event sequence:4. Get Extended (“Wide”) Output
To include the node name and the Pod’s IP address in your listing:In this lesson, you deployed an NGINX Pod on Minikube, inspected its state, and viewed detailed and wide outputs. Next, we’ll define Pods declaratively using YAML manifests.