minikube/README.md

129 lines
5.6 KiB
Markdown
Raw Normal View History

2019-02-15 23:07:44 +00:00
# minikube
2017-03-21 04:57:11 +00:00
2017-08-09 02:07:56 +00:00
[![BuildStatus Widget]][BuildStatus Result]
[![GoReport Widget]][GoReport Status]
[BuildStatus Result]: https://travis-ci.org/kubernetes/minikube
[BuildStatus Widget]: https://travis-ci.org/kubernetes/minikube.svg?branch=master
[GoReport Status]: https://goreportcard.com/report/github.com/kubernetes/minikube
[GoReport Widget]: https://goreportcard.com/badge/github.com/kubernetes/minikube
2017-03-21 04:57:11 +00:00
<img src="https://github.com/kubernetes/minikube/raw/master/logo/logo.png" width="100">
2019-02-15 22:56:28 +00:00
## What is minikube?
2017-03-21 04:57:11 +00:00
2019-02-15 23:07:44 +00:00
A local Kubernetes cluster.
minikube makes running a local Kubernetes cluster fast and easy, supporting macOS, Linux, and Windows. Our goals are to enable fast local development, single command setup and teardown, and support for all Kubernetes features that fit.
## News
* 2019-02-15 - minikube v0.34.0 was released! See the [releases](https://github.com/kubernetes/minikube/releases) page for more.
2019-02-15 22:56:28 +00:00
## Kubernetes features
2017-03-21 04:57:11 +00:00
2019-02-15 23:07:44 +00:00
minikube runs the official stable release of Kubernetes, with support for features such as:
2019-02-15 22:56:28 +00:00
* NodePorts - access via `minikube service`
* Ingress
2019-02-15 23:07:44 +00:00
* LoadBalancer - access via `minikube tunnel` [docs](https://github.com/kubernetes/minikube/blob/master/docs/tunnel.md)
* Persistent Volumes [docs](https://github.com/kubernetes/minikube/blob/master/docs/persistent_volumes.md)
2019-02-15 22:56:28 +00:00
* ConfigMaps
* RBAC
* Secrets
* Dashboard - access via `minikube dashboard`
2019-02-15 23:07:44 +00:00
* Container runtimes - Docker, CRI-O, containerd
2019-02-15 23:07:44 +00:00
## Developer Features
2019-02-15 23:07:44 +00:00
* [Addons](https://github.com/kubernetes/minikube/blob/master/docs/addons.md) - a marketplace for developers to share configurations for running services on minikube
* [GPU support](https://github.com/kubernetes/minikube/blob/master/docs/gpu.md) - for machine learning
* Automatic failure analysis - so you know why your deployment failed
* [Filesystem mounts](https://github.com/kubernetes/minikube/blob/master/docs/host_folder_mount.md)
2017-06-22 17:31:57 +00:00
2019-02-15 22:56:28 +00:00
## Community & Documentation
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
* [**#minikube on Kubernetes Slack**](https://kubernetes.slack.com) - Live chat with minikube developers!
2019-02-15 23:07:44 +00:00
* [minikube-users mailing list](https://groups.google.com/forum/#!forum/minikube-users)
* [minikube-dev mailing list](https://groups.google.com/forum/#!forum/minikube-dev)
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
* [**Advanced Topics and Tutorials**](https://github.com/kubernetes/minikube/blob/master/docs/README.md)
2019-02-15 23:07:44 +00:00
* [Contributing](https://github.com/kubernetes/minikube/blob/master/CONTRIBUTING.md)
* [Development Guide](https://github.com/kubernetes/minikube/blob/master/docs/contributors/README.md)
2017-10-12 18:20:39 +00:00
2019-02-15 22:56:28 +00:00
## Requirements
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
* 4GB of memory (VM reserves 2GB by default), 32GB of disk space
* An internet connection - preferably one that does not require a VPN or SSL proxy to access the internet
* macOS 10.12 (Sierra) or higher
* Requires a hypervisor, such as:
* hyperkit (recommended)
* VirtualBox
* Linux
2019-02-15 22:56:28 +00:00
* libvirt for the KVM driver, or VirtualBox
2019-02-15 23:07:44 +00:00
* VT-x/AMD-v virtualization must be enabled in BIOS
2019-02-15 22:56:28 +00:00
* Windows 10
2019-02-15 23:07:44 +00:00
* HyperV (Windows 10 Pro) or a 3rd party hypervisor, such as VirtualBox.
2019-02-15 22:56:28 +00:00
* VT-x/AMD-v virtualization must be enabled in BIOS
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
## Installation
2017-03-21 04:57:11 +00:00
2019-02-15 23:07:44 +00:00
* *macOS* with [brew](https://brew.sh/): `brew cask install minikube`
* *macOS*: `curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64 && sudo install minikube-darwin-amd64 /usr/local/bin/minikube`
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
* *Windows 10 with Choco* `choco install minikube` (if [Chocolatey](https://chocolatey.org/ is installed)
* *Windows 10 without Choco* - Download [minikube-windows-amd64.exe](https://storage.googleapis.com/minikube/releases/latest/minikube-windows-amd64.exe) file, rename it to `minikube.exe`, and add it to your path.
2017-03-21 04:57:11 +00:00
2019-02-15 23:07:44 +00:00
* *Generic Linux* `curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && sudo install minikube-linux-amd64 /usr/local/bin/minikube`
2019-02-15 22:56:28 +00:00
* [Arch Linux AUR](https://aur.archlinux.org/packages/minikube/)
* [Fedora/CentOS/Red Hat COPR](https://copr.fedorainfracloud.org/coprs/antonpatsev/minikube-rpm/)
* [Void Linux](https://github.com/void-linux/void-packages/tree/master/srcpkgs/minikube/template)
* [openSUSE/SUSE Linux Enterprise](https://build.opensuse.org/package/show/Virtualization:containers/minikube)
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
For full installation instructions, please see https://kubernetes.io/docs/tasks/tools/install-minikube/
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
### Supported Hypervisors
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
`minikube start` defaults to virtualbox, but supports other drivers using the `--vm-driver` argument:
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
* [KVM2](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver) - Recommended Linux driver
* [hyperkit](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver) - Recommended macOS driver
* virtualbox - Recommended Windows driver
2019-02-15 23:07:44 +00:00
* [none](https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md) - bare-metal execution on Linux, at the expense of system security and reliability
Other drivers which are supported but not part of our continuous integration system are:
2019-02-15 22:56:28 +00:00
* [hyperv](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperV-driver)
2019-02-15 23:07:44 +00:00
* [vmware](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver)
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
## Quick Start
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
To start a cluster, run `minikube start`
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
You can then interact with it using `kubectl`, just like any other kubernetes cluster:
2017-03-21 04:57:11 +00:00
```
2019-02-15 22:56:28 +00:00
$ kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080
deployment "hello-minikube" created
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
$ kubectl expose deployment hello-minikube --type=NodePort
service "hello-minikube" exposed
2017-03-21 04:57:11 +00:00
```
2019-02-15 22:56:28 +00:00
You can get the URL for the NodePort deployment by using:
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
`minikube service hello-minikube --url`
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
Start a second local cluster:
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
`minikube start -p cluster2`
2017-10-04 22:01:18 +00:00
2019-02-15 22:56:28 +00:00
Stop your local cluster:
`minikube stop`
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
Delete your local cluster:
2017-03-21 04:57:11 +00:00
2019-02-15 22:56:28 +00:00
`minikube delete`