Add back the CI example from the README.
parent
2b9d521bc6
commit
ae3f7fa925
docs
|
@ -10,6 +10,34 @@ The `none` driver allows advanced minikube users to skip VM creation, allowing m
|
|||
|
||||
The `none` driver supports releases of Debian, Ubuntu, and Fedora that are less than 2 years old. In practice, any systemd-based modern distribution is likely to work, and we will accept pull requests which improve compatibility with other systems.
|
||||
|
||||
## Example: Using minikube for continuous integration testing
|
||||
|
||||
Most continuous integration environments are already running inside a VM, and may not supported nested virtualization. The `none` driver was designed for this use case. Here is an example, that runs minikube from a non-root user, and ensures that the latest stable kubectl is installed:
|
||||
|
||||
```
|
||||
curl -Lo minikube \
|
||||
https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
|
||||
&& sudo install minikube /usr/local/bin/
|
||||
|
||||
kv=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
|
||||
curl -Lo kubectl \
|
||||
https://storage.googleapis.com/kubernetes-release/release/$kv/bin/linux/amd64/kubectl \
|
||||
&& sudo install kubectl /usr/local/bin/
|
||||
|
||||
export MINIKUBE_WANTUPDATENOTIFICATION=false
|
||||
export MINIKUBE_WANTREPORTERRORPROMPT=false
|
||||
export MINIKUBE_HOME=$HOME
|
||||
export CHANGE_MINIKUBE_NONE_USER=true
|
||||
export KUBECONFIG=$HOME/.kube/config
|
||||
|
||||
mkdir -p $HOME/.kube $HOME/.minikube
|
||||
touch $KUBECONFIG
|
||||
|
||||
sudo -E minikube start --vm-driver=none
|
||||
```
|
||||
|
||||
At this point, kubectl should be able to interact with the minikube cluster.
|
||||
|
||||
## Can the none driver be used outside of a VM?
|
||||
|
||||
Yes, *but please avoid doing so if at all possible.*
|
||||
|
@ -56,11 +84,20 @@ These paths will be erased when running `minikube delete`:
|
|||
|
||||
As Kubernetes has full access to both your filesystem as well as your docker images, it is possible that other unexpected data loss issues may arise.
|
||||
|
||||
## Environment variables
|
||||
|
||||
Some environment variables may be useful for using the `none` driver:
|
||||
|
||||
* **CHANGE_MINIKUBE_NONE_USER**: Sets file ownership to the user running sudo ($SUDO_USER)
|
||||
* **MINIKUBE_HOME**: Saves all files to this directory instead of $HOME
|
||||
* **MINIKUBE_WANTUPDATENOTIFICATION**: Toggles the notification that your version of minikube is obsolete
|
||||
* **MINIKUBE_WANTREPORTERRORPROMPT**: Toggles the error reporting prompt
|
||||
* **MINIKUBE_IN_COLOR**: Toggles color output and emoji usage
|
||||
|
||||
## Known Issues
|
||||
|
||||
* You cannot run more than one `--vm-driver=none` instance on a single host
|
||||
* Many `minikube` commands are not supported, such as: `dashboard`, `mount`, `ssh`
|
||||
* minikube with the `none` driver has a confusing permissions model, as some commands need to be run as root ("start"), and others by a regular user ("dashboard")
|
||||
* CoreDNS detects resolver loop, goes into CrashloopBackoff - [#3511](https://github.com/kubernetes/minikube/issues/3511)
|
||||
* [Full list of issues](https://github.com/kubernetes/minikube/labels/co%2Fnone-driver)
|
||||
|
||||
* [Full list of open 'none' driver issues](https://github.com/kubernetes/minikube/labels/co%2Fnone-driver)
|
||||
|
|
Loading…
Reference in New Issue