Minikube start is the gateway drug to running Kubernetes locally, but its flags are a bewildering forest of options.

Let’s see what minikube start actually does under the hood, not just what the flags say they do.

minikube start --driver=docker --kubernetes-version=v1.27.3 --cpus=4 --memory=8192

When you run minikube start, it’s essentially orchestrating a virtual machine (or container, depending on the driver) and then bootstrapping a single-node Kubernetes cluster inside that VM. The flags you pass control every aspect of this process, from the VM’s resources to the Kubernetes version and even how networking is handled.

The Core Components Minikube Manages

  1. The Driver: This is the hypervisor or container runtime that Minikube uses to create the isolated environment for your Kubernetes node.

    • --driver: Specifies the backend. Common options include docker, virtualbox, vmwarefusion, qemu2, none.
      • Example: --driver=docker
      • Why it works: Tells Minikube to use your existing Docker daemon to run the Kubernetes node as a container. This is often the fastest and most resource-efficient option if you already have Docker installed.
  2. The VM/Container Resources: These flags dictate the hardware allocated to the Minikube node.

    • --cpus: Number of CPU cores to assign.
      • Example: --cpus=4
      • Why it works: Allocates 4 CPU cores to the VM/container running your Kubernetes node, giving your pods more processing power.
    • --memory: Amount of RAM to assign (in MB).
      • Example: --memory=8192
      • Why it works: Allocates 8GB of RAM to the VM/container, crucial for running multiple pods and larger applications without hitting memory limits.
    • --disk-size: Size of the virtual disk for the VM (in MB).
      • Example: --disk-size=50g
      • Why it works: Reserves 50GB of disk space for the VM’s filesystem, ensuring enough room for container images, etcd data, and application storage.
  3. Kubernetes Configuration: This is where you define the Kubernetes version and its components.

    • --kubernetes-version: The exact Kubernetes version to install.
      • Example: --kubernetes-version=v1.27.3
      • Why it works: Minikube downloads and deploys the specified version of Kubernetes components (kube-apiserver, kubelet, controller-manager, etc.) within the node. This ensures you’re testing against a specific, known version.
    • --image-mirror-country: Sets an image mirror country to speed up image pulls.
      • Example: --image-mirror-country=us
      • Why it works: Configures container image registries to use mirrors located in the specified country, reducing latency when downloading Kubernetes images.
    • --container-runtime: The container runtime to use within the Kubernetes node.
      • Example: --container-runtime=containerd
      • Why it works: Sets containerd as the runtime instead of the default docker (if the driver is not docker), influencing how containers are managed by the Kubelet.
  4. Networking and Ingress: How your local cluster talks to the outside world.

    • --network: Specifies the network to use for the VM.
      • Example: --network=host
      • Why it works: Connects the Minikube VM directly to your host’s network interface, allowing services to be accessed on your host’s IP address without port forwarding. This can sometimes cause port conflicts.
    • --enable-default-cni: Enables a default Container Network Interface (CNI) plugin.
      • Example: --enable-default-cni
      • Why it works: Ensures a basic networking solution (like bridge or calico depending on Minikube version) is installed and configured, allowing pods to communicate with each other.
    • --ingress-dns and --ingress-controller: Configure an Ingress controller and its DNS.
      • Example: --ingress-dns=192.168.49.5 and --ingress-controller=nginx
      • Why it works: Deploys an Nginx Ingress controller and sets up DNS resolution for it, allowing you to test Ingress resources for external access to your services. The IP is typically the IP of the Minikube VM.
  5. Add-ons and Features: Enabling extra Kubernetes components.

    • --addons: A comma-separated list of add-ons to enable.
      • Example: --addons=ingress,metrics-server
      • Why it works: Automatically deploys and configures pre-packaged Kubernetes components like the Ingress controller or the metrics-server, saving you manual deployment steps.
    • --disable-dns: Disables the built-in DNS server.
      • Example: --disable-dns
      • Why it works: Prevents Minikube from setting up its internal DNS (CoreDNS or kube-dns), useful if you plan to use an external DNS solution or have specific testing needs.
  6. Advanced/Troubleshooting: Less common but powerful options.

    • --iso-url: Specify a custom URL for the Minikube ISO.
      • Example: --iso-url=https://storage.googleapis.com/minikube/iso/minikube-v1.27.3.iso
      • Why it works: Allows you to use a specific, potentially older or custom-built, Minikube VM image.
    • --wait: How long to wait for Kubernetes to become ready.
      • Example: --wait=5m
      • Why it works: Sets a timeout for the cluster bootstrapping process, preventing minikube start from hanging indefinitely if something goes wrong during initialization.
    • --nodes: Number of nodes to create (for multi-node Minikube, experimental).
      • Example: --nodes=3
      • Why it works: Attempts to provision a Minikube cluster with multiple nodes, though this feature’s stability can vary significantly by driver.

When you run minikube start with these flags, Minikube first provisions the VM/container using the specified driver and resources. Then, it downloads the necessary Kubernetes binaries for the chosen version and bootstraps the control plane and a single worker node within that environment. Finally, it configures kubectl to point to this new cluster and enables any requested add-ons.

The next hurdle is often understanding how to expose services outside the Minikube VM, which leads you into the world of NodePort, LoadBalancer, and Ingress.

Want structured learning?

Take the full Minikube course →