Minikube (Kubernetes)

Kubernetes - Minikube Setup

Minikube provisions and runs a single-node Kubernetes cluster locally using a driver (a Docker container in my case) that acts as both the control plane and worker node.
This is how I installed Minikube, and automated the startup process.

Architecture

  • Single-node cluster:
    • Control plane components (API server, scheduler, controller manager, etcd)
    • Worker node components (kubelet, container runtime)
  • All components run inside the Minikube-managed environment

Dependencies

  • Docker
  • GitBash

Setup

Start Minikube with minikube start --driver=docker. Minikube manages the container lifecycle; you don’t have to manually start it via Docker.
  • kubectl Utility Integration:
    • kubectl communicates with the Kubernetes API server inside Minikube
    • Minikube automatically configures the kubeconfig context
Optionally set an alias for kubectl with alias k='kubectl'. Make sure to add it to /.bashrc if you want it to persist.
notion image

Automation

Wrote a bash script to automate startup. Not totally necessary, but makes it easy and runs a command immediately to show info.
I set up another bash alias to run the script with minikube_startup.
  • Checks Minikube status
  • Starts Minikube
  • Shows cluster-info
notion image