kubectl. A Pod is the smallest deployable unit in Kubernetes and can contain one or more containers that share storage, network, and a specification for how to run the containers.
Make sure your Minikube cluster is running and
kubectl is configured to use the Minikube context. Verify with kubectl config current-context or minikube status.Create a simple Pod
With modernkubectl, use --restart=Never to create a Pod instead of a Deployment:
- The Pod name (
nginx) must be a valid DNS label. - The image must be available from Docker Hub (https://hub.docker.com/) or another container registry. You can specify a tag such as
nginx:1.21or a fully qualified registry address.
Understand kubectl get pods columns
The columns returned by kubectl get pods help you quickly assess the Pod state. Here’s a quick reference:
Inspect a Pod in detail
For more detailed info, usekubectl describe pod <pod-name>:
kubectl describe:
- Pod name, labels, and start time.
- Which node the Pod is scheduled on (e.g.,
minikube/192.168.99.100) and the Pod’s internal IP (172.17.0.3). - Container-specific details: image, container ID, state, and readiness.
- Events section that records lifecycle steps (Scheduled, Pulling, Pulled, Created, Started) — essential for troubleshooting.
Be cautious when using container images from unknown registries. Use pinned image tags (not
:latest) in production to avoid unexpected changes.Get more fields with wide output
kubectl get pods -o wide shows additional fields like Pod IP and node:
-o wide output is useful to see where each Pod is running (node name) and the Pod IP assigned by the cluster networking.
Quick reference: common Pod commands
Notes and next steps
Each Pod receives an internal cluster IP. Pod networking and IP allocation are advanced topics — explore CNI plugins, Services, and Network Policies for production setups. This demonstration showed how to run a single-container Pod in Minikube. Topics you may want to explore next:- Declarative Pod manifests (YAML)
- Deployments for managed replicas and rolling updates
- Pods with multiple containers (sidecars)
- Services and exposing Pods externally