Skip to main content

Command Palette

Search for a command to run...

Navigating Kubernetes Locally: Tools and Techniques

Published
4 min read
Navigating Kubernetes Locally: Tools and Techniques
J
IT Professional with 4+ years of combined experience across Software Engineering, DevOps, Cloud, Technical Writing, and AI-assisted Development. Passionate about building things, simplifying complex technology, and continuously learning while sharing knowledge through hands-on experimentation and technical writing.

If you're starting out in the world of Kubernetes (K8s)—whether you're a DevOps enthusiast, cloud learner, or developer—you're probably asking:

❓ How do I install Kubernetes locally?
❓ What is kubectl? Do I need Docker?
❓ What's minikube and kind?

This blog will help you clearly understand the ecosystem, tools, and setup flow.


📦 What is kubectl?

kubectl is the command-line tool for Kubernetes. It lets you:

  • Deploy applications to a cluster

  • Manage cluster resources

  • Inspect logs, nodes, pods, and services

  • Scale workloads and roll out updates

🧠 Think of it as:

Your remote control to interact with a Kubernetes cluster.

Example Commands:

kubectl get nodes         # List cluster nodes
kubectl get pods -A       # View all pods
kubectl apply -f app.yaml # Apply a configuration file
kubectl logs <pod-name>   # Check logs

BUT! kubectl does nothing on its own. It requires a cluster to talk to.


🔄 The Server-Client Relationship in Kubernetes

At its core, Kubernetes follows a client-server architecture, where:

  • kubectl is the client

  • Kubernetes API Server is the server


🧩 1. Who is the Client?

kubectl
This is the CLI tool you use to send requests like:

  • “Create a pod”

  • “Show all deployments”

  • “Scale this app”

  • “Delete a service”

But kubectl doesn’t do the work—it simply tells the server what you want to happen.


🧠 2. Who is the Server?

Kubernetes API Server
This is the brain of the cluster, running inside the control plane node (e.g., Minikube). It:

  • Receives HTTP requests from kubectl or other clients

  • Validates and processes them

  • Stores data in etcd (the K8s database)

  • Communicates with other components like the Scheduler, Controller Manager, and Kubelets to make it happen


🔁 The Communication Flow

You (CLI user)
     ↓
kubectl (client)
     ↓
Kubernetes API Server (server)
     ↓
Kubernetes internal components (Scheduler, Kubelets, etc.)

So, whenever you run:

kubectl get pods

The flow is:

  1. kubectl formats that as an HTTP request

  2. Sends it to the API server (usually at https://<cluster-ip>:6443)

    You can check your API server endpoint via:

     kubectl config view
    

    Or:

     kubectl cluster-info
    

    You’ll see output like:

     Kubernetes control plane is running at https://192.168.49.2:6443
    
  3. The API server queries etcd or the cluster

  4. Response is returned to you via kubectl


🏗️ What Do You Need to Run Kubernetes Locally?

To actually use Kubernetes commands via kubectl, you need an actual Kubernetes cluster. You can set it up in several ways:


🔧 Different Ways to Set Up Kubernetes

MethodDescriptionBest For
MinikubeRuns a local K8s cluster in a VM or containerBeginners, single-node setups
kindRuns Kubernetes inside Docker containersCI pipelines, lightweight testing
k3sLightweight Kubernetes distributionIoT, edge, or low-resource devices
Cloud-based (e.g., EKS, GKE, AKS)Fully managed Kubernetes clustersReal-world production environments
KubeadmManual setup of Kubernetes clusterAdvanced users, production clusters

Minikube

  • Spins up a single-node cluster

  • Works using drivers like Docker, VirtualBox, KVM, etc.

  • Great for experimenting and running real apps locally

kind (Kubernetes IN Docker)

  • Runs clusters inside Docker containers

  • Lightweight and fast

  • Ideal for CI/CD pipelines or testing on Docker-enabled machines


🔄 Flow of Tools

1. You install and start a local cluster (via minikube or kind)
         ↓
2. This cluster creates a kubeconfig file (cluster access credentials)
         ↓
3. kubectl uses that config to connect and manage the cluster

So, the relationship looks like this:

minikube/kind → Kubernetes cluster ← kubectl

🔍 Example: You Start Minikube with Docker Installed

minikube start

Output:

* Automatically selected the docker driver
* Starting "minikube" primary control-plane node...

Minikube sees Docker is installed and uses it to spin up a container-based Kubernetes node.


❌ What Happens if Docker is Not Installed?

You’ll get something like:

😿  Exiting due to PROVIDER_NOT_FOUND: No compatible minikube driver found.

In this case, you either:

  • Install Docker ✅

  • Install another driver (like VirtualBox or Podman) ✅

  • Or switch to another setup method like k3s


🎓 Final Thoughts

  • Install kubectl to manage your cluster.

  • Install minikube or kind to create a local cluster.

  • Install Docker if you're using kind or want a faster minikube setup.

  • Understand that kubectl needs a cluster to work with, and minikube/kind provides that.

Once set up, you're ready to start deploying apps and learning Kubernetes the real way.

More from this blog

D

Demystifying Tech with Jasai

104 posts

Demystifying Tech with Jasai is a blog dedicated to breaking down complex tech concepts into clear, beginner-friendly explanations. Covering DevOps, Docker, Git, AWS, CI/CD, Networking, and core programming fundamentals, it emphasizes strong foundations before advanced topics. Through step-by-step walkthroughs and real-world analogies, it simplifies the why behind the how — making technology approachable, structured, and built for long-term growth.