Skip to main content

Command Palette

Search for a command to run...

How To Install Minikube And Run Your First Kubernetes App

Getting Started with Minikube: Your First Step Into Kubernetes

Updated
3 min read

Getting Started with Minikube: Your Local Kubernetes Playground

Kubernetes is the industry standard for container orchestration, but setting up a full cluster can be complex. Minikube makes it simple—letting you run a local Kubernetes cluster on your laptop or workstation. In this guide, you’ll learn how to install Minikube and deploy your very first app.


What is Minikube?

Minikube is a tool that lets you run a single-node Kubernetes cluster locally. It’s perfect for learning, prototyping, and development before deploying to a real production cluster.


Prerequisites

  • Operating System: Linux, macOS, or Windows

  • Virtualization: Enable VT-x/AMD-v in your BIOS if you want to use a VM driver

  • Package Managers: Homebrew (macOS), Chocolatey (Windows), or apt/yum (Linux)


1. Install Kubectl

Kubectl is the command-line tool to interact with Kubernetes clusters.

On Linux:

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl version --client

On macOS:

brew install kubectl
kubectl version --client

On Windows:

choco install kubernetes-cli
kubectl version --client

2. Install Minikube

On Linux:

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

On macOS:

brew install minikube
minikube version

On Windows:

choco install minikube
minikube version

3. Start Minikube Cluster

minikube start
  • This command will download a VM image and set up your cluster.

  • By default, it uses the Docker driver if available; you can specify another driver if needed (e.g., --driver=virtualbox).


4. Verify Your Cluster

Check the status:

minikube status

Check cluster info:

kubectl cluster-info

5. Deploy Your First App

Let’s deploy a simple Hello World app to your Minikube cluster.

Create a Deployment:

kubectl create deployment hello-minikube --image=kicbase/echo-server:1.0

Expose the Deployment as a Service:

kubectl expose deployment hello-minikube --type=NodePort --port=8080

View the App in Your Browser:

minikube service hello-minikube
  • This command opens the app in your default browser.

6. Useful Minikube Commands

  • View all pods:

      kubectl get pods
    
  • View all services:

      kubectl get svc
    
  • SSH into the minikube VM:

      minikube ssh
    
  • Stop Minikube:

      minikube stop
    
  • Delete the cluster:

      minikube delete
    

7. Troubleshooting Tips

  • If minikube start fails, try specifying a driver: minikube start --driver=docker or minikube start --driver=virtualbox

  • If you use Windows, make sure Hyper-V or VirtualBox is installed and enabled.

  • Use minikube logs to troubleshoot startup problems.


8. Next Steps

  • Deploy more complex applications (databases, multi-tier apps)

  • Explore Minikube add-ons (minikube addons list)

  • Learn about YAML configuration and Kubernetes manifests


💡 Conclusion

Minikube is your go-to tool for learning Kubernetes locally. With just a few commands, you can have a running cluster and start deploying containerized applications. Play around, break things, and enjoy the world of Kubernetes!


Happy Kubernetes-ing! If you have any questions, drop them in the comments below.

More from this blog

সেলফ-ব্যালেন্সিং রোবট: রোবোটিক্স প্রযুক্তিতে এক যুগান্তকারী উদ্ভাবন

রোবোটিক্সের জগতে, সেলফ-ব্যালেন্সিং রোবট এক অদ্ভুত এবং চমৎকার আবিষ্কার। এই রোবটগুলি কোনো বাহ্যিক সহায়তা ছাড়াই নিজেদের ভারসাম্য রক্ষা করতে পারে, ঠিক যেমন একটি সেগওয়ে বা দুটি চাকার স্কুটার। এই রোবটগুলি সেন্সর, মোটর এবং জটিল অ্যালগরিদম ব্যবহার করে ভার...

Jul 23, 20251 min read
সেলফ-ব্যালেন্সিং রোবট: রোবোটিক্স প্রযুক্তিতে এক যুগান্তকারী উদ্ভাবন

চলুন আমরা মেশিন লার্নিংয়ের বেসিক ক্যাটাগরি নিয়ে জানি

আজকে মেশিন লার্নিংয়ের কিছু বেসিক বিষয় শিখবো! মেশিন লার্নিং আসলে এমন একটা প্রযুক্তি, যেখানে কম্পিউটার নিজে থেকে শিখে এবং সময়ের সাথে সাথে আরও ভালো সিদ্ধান্ত নিতে থাকে। তো, তিনটি প্রধান ক্যাটেগরিতে মেশিন লার্নিং ভাগ করা হয়: ১. সুপারভাইজড লার্নিং (Superv...

Jul 22, 20252 min read
চলুন আমরা মেশিন লার্নিংয়ের বেসিক ক্যাটাগরি নিয়ে জানি

The Dev Lab – by Pappuraj

5 posts