Initial Setup

Get Kubernetes installed and deploy your first application. This guide walks you through local Kubernetes setup and your first deployment.

🎯 What You’ll Accomplish

By the end of this tutorial, you’ll have:

  • βœ… Kubernetes running locally
  • βœ… kubectl CLI configured
  • βœ… Your first pod deployed

πŸ“‹ Prerequisites

  • Docker installed
  • Basic command line familiarity
  • 4GB RAM minimum

πŸ’Ύ Step 1: Install Kubernetes

Using Minikube (Recommended for Learning)

# 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
choco install minikube

Using Docker Desktop

Enable Kubernetes in Docker Desktop Settings.

Install kubectl

# macOS
brew install kubectl

# Linux
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl

# Windows
choco install kubernetes-cli

πŸš€ Step 2: Start Kubernetes

minikube start
kubectl cluster-info
kubectl get nodes

πŸ“¦ Step 3: Deploy Your First Application

kubectl create deployment nginx --image=nginx
kubectl get deployments
kubectl get pods

🌐 Step 4: Expose the Application

kubectl expose deployment nginx --type=NodePort --port=80
kubectl get services
minikube service nginx --url

Visit the URL shown to see nginx running.

βœ… Verification Checklist

Before moving forward, verify:

  • kubectl version shows client and server versions
  • kubectl get nodes shows nodes ready
  • Deployment created and pod running
  • Service accessible via browser

πŸŽ‰ You’re Done!

You’ve successfully set up Kubernetes and deployed your first application.

πŸ“š What’s Next?

Quick learner: Kubernetes Quick Start

Code-first learner: Kubernetes By Example

Last updated