quickstart5 min read

Deploy Your First Kubernetes Pod in 15 Minutes

SFEIR Institute

Key Takeaways

  • The pod is the smallest execution unit in Kubernetes, encapsulating one or more containers
  • Deploy your first pod in 15 minutes with Minikube and kubectl run

Want to launch your first Kubernetes pod? This beginner tutorial guides you step by step, from installation to running a working container. In 15 minutes, you'll learn the essential commands that every Backend Kubernetes developer, Full-Stack Kubernetes developer, or software engineer Kubernetes must know.

TL;DR

You'll install Minikube, create your first pod with kubectl run, check its state, and access the logs. Each step includes the exact command and expected output.

To deepen these skills, discover the Kubernetes Fundamentals training.

Why Learn to Deploy a First Kubernetes Pod as a Beginner?

According to the CNCF Annual Survey 2025, 82% of container users run Kubernetes in production. This massive adoption means you need to know the basics to stay competitive in the market.

"Anybody can learn Kubernetes. With abundant documentation and development tools available online, teaching yourself Kubernetes is very much within reach." - The Enterprisers Project

A pod represents the smallest execution unit in Kubernetes. It encapsulates one or more containers sharing the same network and storage. Understanding this fundamental concept opens the door to container orchestration at scale.

Remember: The pod is to Kubernetes what the container is to Docker. You never deploy a container directly, but always through a pod.

Prerequisites: What You Need Before Starting

Check your environment before continuing this first Kubernetes pod beginner tutorial:

ElementMinimum VersionVerification
Docker Desktop4.25+docker --version
kubectl1.28+kubectl version --client
Available RAM4 GBTask manager
Disk space20 GBdf -h

Install kubectl if not already done:

# macOS
brew install kubectl

# Linux (Debian/Ubuntu)
sudo apt-get update && sudo apt-get install -y kubectl

# Windows (with Chocolatey)
choco install kubernetes-cli

Check the kubectl cheat sheet: all essential Kubernetes commands for a complete command reference.

Step 1: Install and Start Minikube

Minikube creates a local Kubernetes cluster on your machine. Download and install according to your system:

# macOS
brew install minikube

# Linux
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

# Windows (PowerShell admin)
choco install minikube

Start your cluster with the following command:

minikube start --driver=docker

Expected output:

😄  minikube v1.32.0 on Darwin
✨  Using the docker driver based on user configuration
📌  Using Docker Desktop driver with root privileges
🔥  Creating kubernetes in docker container
🐳  Preparing Kubernetes v1.28.3 on Docker
🏄  Done! kubectl is now configured to use "minikube" cluster
Remember: Minikube simulates a complete cluster on your workstation. You can experiment without risking affecting a production environment.

Step 2: Verify Connection to Your Cluster

Confirm that kubectl communicates correctly with your cluster:

kubectl cluster-info

You should see:

Kubernetes control plane is running at https://127.0.0.1:55000
CoreDNS is running at https://127.0.0.1:55000/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

List available nodes:

kubectl get nodes
NAME       STATUS   ROLES           AGE   VERSION
minikube   Ready    control-plane   2m    v1.28.3

This step validates that your environment works. The Kubernetes tutorials and practical guides cover more advanced configurations.

Step 3: Create Your First Pod with kubectl run

Launch an nginx pod with a single command:

kubectl run my-first-pod --image=nginx:1.25 --port=80
pod/my-first-pod created

This command performs three actions:

  1. Downloads the nginx:1.25 image from Docker Hub
  2. Creates a pod named "my-first-pod"
  3. Configures the container to listen on port 80

Step 4: Check Your Pod State

Monitor the deployment of your pod:

kubectl get pods
NAME           READY   STATUS    RESTARTS   AGE
my-first-pod   1/1     Running   0          30s

Possible statuses:

StatusMeaning
PendingPod waiting for resources
ContainerCreatingDownloading image
RunningPod operational
ErrorStartup failure

Get complete details about your pod:

kubectl describe pod my-first-pod

This command displays events, conditions, and complete configuration. Backend Kubernetes developers use it daily to diagnose problems.

Remember: kubectl describe is your primary diagnostic tool. You'll find image pull errors, resource issues, and health check failures there.

Step 5: Access Container Logs

View standard output of your container:

kubectl logs my-first-pod
/docker-entrypoint.sh: Configuration complete; ready for start up
2026/02/28 10:15:32 [notice] 1#1: nginx/1.25.4
2026/02/28 10:15:32 [notice] 1#1: start worker processes

Follow logs in real-time with the -f option:

kubectl logs -f my-first-pod

Press Ctrl+C to exit follow mode. These commands are essential for any software engineer Kubernetes debugging applications in production.

Step 6: Execute Commands Inside the Pod

Open an interactive shell in your container:

kubectl exec -it my-first-pod -- /bin/bash

You're now inside the container. Test nginx:

curl localhost:80
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
...

Exit the shell with exit. This technique allows you to debug directly in the execution environment.

Step 7: Expose Your Pod Locally

Create a port-forward to access the pod from your browser:

kubectl port-forward my-first-pod 8080:80
Forwarding from 127.0.0.1:8080 -> 80

Open your browser at http://localhost:8080. You'll see the nginx welcome page. Full-Stack Kubernetes developers use this method to test their applications before configuring an Ingress.

To go further, see Configure a Kubernetes Ingress Controller step by step: Nginx and Traefik.

Clean Up Your Environment

Delete the pod once the exercise is complete:

kubectl delete pod my-first-pod
pod "my-first-pod" deleted

Stop Minikube to free resources:

minikube stop

According to the Spectro Cloud State of Kubernetes 2025 report, IT teams spend an average of 34 working days per year resolving Kubernetes problems. Knowing the basics saves you valuable time.

What You Learned

You now know how to:

  • Install and start a local cluster with Minikube
  • Create a pod with kubectl run
  • Check state with kubectl get and kubectl describe
  • View logs with kubectl logs
  • Access the container with kubectl exec
  • Expose a pod with kubectl port-forward

What's the Next Step for a Backend Kubernetes Developer?

Your first pod is running. Continue your learning with these resources:

Check our training calendar for upcoming in-person sessions.

Take Action: Train with SFEIR

You've deployed your first pod. Accelerate your skill development with certifying trainings:

Contact our advisors to start your certification journey.