Improved formatting
							parent
							
								
									eeb0a4f109
								
							
						
					
					
						commit
						c0a66f62a9
					
				| 
						 | 
				
			
			@ -1,6 +1,13 @@
 | 
			
		|||
 | 
			
		||||
## Minikube Environment Variables
 | 
			
		||||
Minikube supports passing environment variables instead of flags for every value listed in `minikube config list`.  This is done by passing an environment variable with the prefix `MINIKUBE_`. For example the `minikube start --iso-url="$ISO_URL"` flag can also be set by setting the `MINIKUBE_ISO_URL="$ISO_URL"` environment variable.
 | 
			
		||||
# minikube Environment Variables
 | 
			
		||||
 | 
			
		||||
## Config option variables
 | 
			
		||||
 | 
			
		||||
minikube supports passing environment variables instead of flags for every value listed in `minikube config list`.  This is done by passing an environment variable with the prefix `MINIKUBE_`. 
 | 
			
		||||
 | 
			
		||||
For example the `minikube start --iso-url="$ISO_URL"` flag can also be set by setting the `MINIKUBE_ISO_URL="$ISO_URL"` environment variable.
 | 
			
		||||
 | 
			
		||||
## Other variables
 | 
			
		||||
 | 
			
		||||
Some features can only be accessed by environment variables, here is a list of these features:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -15,16 +22,39 @@ Some features can only be accessed by environment variables, here is a list of t
 | 
			
		|||
* **MINIKUBE_WANTKUBECTLDOWNLOADMSG** - (bool) sets whether minikube should tell a user that `kubectl` cannot be found on there path
 | 
			
		||||
* **MINIKUBE_WANTNONEDRIVERWARNING** - (bool) sets whether minikube should warn a user about running the 'none' driver
 | 
			
		||||
 | 
			
		||||
* **MINIKUBE_ENABLE_PROFILING** - (int, `1` enables it) enables trace profiling to be generated for minikube which can be analyzed via:
 | 
			
		||||
* **MINIKUBE_ENABLE_PROFILING** - (int, `1` enables it) enables trace profiling to be generated for minikube
 | 
			
		||||
 | 
			
		||||
## Making these values permanent
 | 
			
		||||
 | 
			
		||||
To make the exported variables permanent:
 | 
			
		||||
 | 
			
		||||
* Linux and macOS: Add these declarations to `~/.bashrc` or wherever your shells environment variables are stored.
 | 
			
		||||
* Windows: Add these declarations via [system settings](https://support.microsoft.com/en-au/help/310519/how-to-manage-environment-variables-in-windows-xp) or using [setx](https://stackoverflow.com/questions/5898131/set-a-persistent-environment-variable-from-cmd-exe)
 | 
			
		||||
 | 
			
		||||
### Example: Disabling emoji
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
export MINIKUBE_IN_COLOR=false
 | 
			
		||||
minikube start
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Example: Profiling
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
# set env var and then run minikube
 | 
			
		||||
$ MINIKUBE_ENABLE_PROFILING=1 ./out/minikube start
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Output:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
2017/01/09 13:18:00 profile: cpu profiling enabled, /tmp/profile933201292/cpu.pprof
 | 
			
		||||
Starting local Kubernetes cluster...
 | 
			
		||||
Kubectl is now configured to use the cluster.
 | 
			
		||||
2017/01/09 13:19:06 profile: cpu profiling disabled, /tmp/profile933201292/cpu.pprof
 | 
			
		||||
 | 
			
		||||
# Then you can examine the profile with:
 | 
			
		||||
$ go tool pprof  /tmp/profile933201292/cpu.pprof
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Examine the cpu profiling results:
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
go tool pprof  /tmp/profile933201292/cpu.pprof
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue