🐳 A Beginner’s Guide to Kubernetes Deployment and Management

Kubernetes, also known as K8s, is an open-source platform that automates the deployment, scaling, and management of containerized applications. In simple terms, it helps developers run applications in containers (like Docker) efficiently.

✅ Step 1: Understand What Kubernetes Is

Kubernetes is a container orchestration tool.
That means it manages multiple containers (like Docker containers) across many servers. Think of it like a traffic controller for your apps.

KEY CONCEPTS

✅Step 2: Install Docker (Required for Kubernetes)

docker –version

✅Step 3: Install Kubernetes (via Minikube)

Minikube allows you to run Kubernetes locally.

Use the command to change permissions: chmod +x minikube

Move it using: sudo install minikube /usr/local/bin/minikube

minikube version

minikube start

kubectl get nodes

You should see output showing your Minikube cluster node in a “Ready” state

✅ Step 4: Deploy Your First Application

kubectl create deployment nginx-app –image=nginx

This command tells Kubernetes to deploy an app named nginx-app using the official NGINX Docker image.

kubectl get deployments

kubectl get pods

✅Step 5: Expose the Application

Your NGINX app is running, but it’s not accessible from your browser yet.

kubectl expose deployment nginx-app –type=NodePort –port=80

This exposes the app on a port on your local machine.

minikube service nginx-app –url

Open that URL in your browser to see the NGINX welcome page.

✅ Step 6: Scale Your Application

Want to run multiple instances of your app?

kubectl scale deployment nginx-app –replicas=3

kubectl get pods

You’ll now see three pods running the same application.

✅Step 7: Clean Up

Your NGINX app is running, but it’s not accessible from your browser yet.

kubectl delete service nginx-app
kubectl delete deployment nginx-app
minikube stop

🎯 Wrapping Up

You’ve now:

Scroll to Top