minikube start
minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes.
All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: minikube start
What you’ll need
- 2 CPUs or more
- 2GB of free memory
- 20GB of free disk space
- Internet connection
- Container or virtual machine manager, such as: Docker, QEMU, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware Fusion/Workstation
1Installation
Click on the buttons that describe your target platform. For other architectures, see the release page for a complete list of minikube binaries.
Operating system
Architecture
Release type
Installer type
To install the latest minikube stable release on x86-64 Linux using binary download:
2Start your cluster
From a terminal with administrator access (but not logged in as root), run:
If minikube fails to start, see the drivers page for help setting up a compatible container or virtual-machine manager.
3Interact with your cluster
If you already have kubectl installed (see documentation), you can now use it to access your shiny new cluster:
Alternatively, minikube can download the appropriate version of kubectl and you should be able to use it like this:
You can also make your life easier by adding the following to your shell config: (for more details see: kubectl)
Initially, some services such as the storage-provisioner, may not yet be in a Running state. This is a normal condition during cluster bring-up, and will resolve itself momentarily. For additional insight into your cluster state, minikube bundles the Kubernetes Dashboard, allowing you to get easily acclimated to your new environment:
4Deploy applications
Create a sample deployment and expose it on port 8080:
It may take a moment, but your deployment will soon show up when you run:
The easiest way to access this service is to let minikube launch a web browser for you:
Alternatively, use kubectl to forward the port:
Tada! Your application is now available at http://localhost:7080/.
You should be able to see the request metadata in the application output. Try changing the path of the request and observe the changes. Similarly, you can do a POST request and observe the body show up in the output.
To access a LoadBalancer deployment, use the “minikube tunnel” command. Here is an example deployment:
In another window, start the tunnel to create a routable IP for the ‘balanced’ deployment:
To find the routable IP, run this command and examine the EXTERNAL-IP
column:
Your deployment is now available at <EXTERNAL-IP>:8080
Enable ingress addon:
The following example creates simple echo-server services and an Ingress object to route to these services.
Apply the contents
Wait for ingress address
Note for Docker Desktop Users:
To get ingress to work you’ll need to open a new terminal window and run minikube tunnel
and in the following step use 127.0.0.1
in place of <ip_from_above>
.
Now verify that the ingress works
5Manage your cluster
Pause Kubernetes without impacting deployed applications:
Unpause a paused instance:
Halt the cluster:
Change the default memory limit (requires a restart):
Browse the catalog of easily installed Kubernetes services:
Create a second cluster running an older Kubernetes release:
Delete all of the minikube clusters:
Take the next step
- The minikube handbook
- Community-contributed tutorials
- minikube command reference
- Contributors guide
- Take our fast 5-question survey to share your thoughts 🙏
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.