未验证 提交 5b215eb7 编写于 作者: T Thomas Strömberg 提交者: GitHub

Merge pull request #4964 from tstromberg/move-the-docs2

[2/3] Copy documentation into Hugo
......@@ -32,8 +32,8 @@ You can also achieve persistence by creating a PV in a mounted host folder.
## Dynamic provisioning and CSI
In addition, minikube implements a very simple, canonical implementation of dynamic storage controller that runs alongside its deployment. This manages provisioning of *hostPath* volumes (rather then via the previous, in-tree hostPath provider).
In addition, minikube implements a very simple, canonical implementation of dynamic storage controller that runs alongside its deployment. This manages provisioning of *hostPath* volumes (rather then via the previous, in-tree hostPath provider).
The default [Storage Provisioner Controller](https://github.com/kubernetes/minikube/blob/master/pkg/storage/storage_provisioner.go) is managed internally, in the minikube codebase, demonstrating how easy it is to plug a custom storage controller into kubernetes as a storage component of the system, and provides pods with dynamically, to test your pod's behaviour when persistent storage is mapped to it.
Note that this is not a CSI based storage provider, rather, it simply declares a PersistentVolume object of type hostpath dynamically when the controller see's that there is an outstanding storage request.
NOTE: this is not a CSI based storage provider. It simply declares an appropriate PersistentVolume in response to an incoming storage request.
......@@ -148,4 +148,10 @@ footer.bg-dark {
// Reduce section padding by 1rem
section.td-box--height-auto {
padding-bottom: 3rem !important;
}
// Allow code tags to span most of a window length (default is 80%)
div.td-content pre {
max-width: 99% !important;
}
\ No newline at end of file
---
title: "Building minikube"
linkTitle: "Building"
title: "Building the minikube binary"
date: 2019-07-31
weight: 4
description: >
Building minikube
weight: 2
---
This guide covers both building the minikube binary and the ISO.
## Prerequisites
* A recent Go distribution (>=1.12)
......@@ -27,13 +24,15 @@ git clone https://github.com/kubernetes/minikube.git
cd minikube
```
## Building the binary
## Compiling minikube
```shell
make
```
Alternatively, you may cross-compile to/from different operating systems:
## Compiling minikube using Docker
To cross-compile to/from different operating systems:
```shell
MINIKUBE_BUILD_IN_DOCKER=y make cross
......@@ -51,71 +50,7 @@ Start the cluster using your built minikube with:
## Building the ISO
The minikube ISO is booted by each hypervisor to provide a stable minimal Linux environment to start Kubernetes from. It is based on coreboot, uses systemd, and includes all necessary container runtimes and hypervisor guest drivers.
### Prerequisites
See the above requirements for building the minikube binary. Additionally, you will need:
```shell
sudo apt-get install build-essential gnupg2 p7zip-full git wget cpio python \
unzip bc gcc-multilib automake libtool locales
```
### Build instructions
```shell
$ make buildroot-image
$ make out/minikube.iso
```
The build will occur inside a docker container. If you want to do this on
baremetal, replace `make out/minikube.iso` with `IN_DOCKER=1 make out/minikube.iso`.
The bootable ISO image will be available in `out/minikube.iso`.
### Using a local ISO image
```shell
$ ./out/minikube start --iso-url=file://$(pwd)/out/minikube.iso
```
### Modifying buildroot components
To change which Linux userland components are included by the guest VM, use this to modify the buildroot configuration:
```shell
cd out/buildroot
make menuconfig
make
```
To save these configuration changes, execute:
```shell
make savedefconfig
```
The changes will be reflected in the `minikube-iso/configs/minikube_defconfig` file.
### Adding kernel modules
To make kernel configuration changes and save them, execute:
```shell
$ make linux-menuconfig
```
This will open the kernel configuration menu, and then save your changes to our
iso directory after they've been selected.
### Adding third-party packages
To add your own package to the minikube ISO, create a package directory under `iso/minikube-iso/package`. This directory will require at least 3 files:
`<package name>.mk` - A Makefile describing how to download the source code and build the program
`<package name>.hash` - Checksums to verify the downloaded source code
`Config.in` - buildroot configuration.
For a relatively simple example to start with, you may want to reference the `podman` package.
See [Building the minikube ISO](../iso)
## Continuous Integration Builds
......
---
title: "Contributor Guide"
linkTitle: "Guide"
date: 2019-07-31
weight: 1
description: >
How to become a minikube contributor
---
### Code of Conduct
Be excellent to each another. Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md).
### License Agreement
We'd love to accept your patches! Before we can take them, [please fill out either the individual or corporate Contributor License Agreement (CLA)](http://git.k8s.io/community/CLA.md)
### Finding issues to work on
* ["good first issue"](https://github.com/kubernetes/minikube/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - issues where there is a clear path to resolution
* ["help wanted"](https://github.com/kubernetes/minikube/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+) - issues where we've identified a need but not resources to work on them
"priority/important-soon" or "priority/important-longterm: - high impact issues that need to be addressed in the next couple of releases.
* Ask on the #minikube Slack if you aren't sure
Once you've discovered an issue to work on:
* Add a comment mentioning that you plan to work on the issue
* Send a PR out that mentions the issue
* Comment on the issue with `/assign` to assign it to yourself
### Contributing A Patch
1. Submit an issue describing your proposed change
2. A reviewer will respond to your issue promptly.
3. If your proposed change is accepted, and you haven't already done so, sign the [Contributor License Agreement (CLA)](http://git.k8s.io/community/CLA.md)
4. Fork the minikube repository, develop and test your code changes.
5. Submit a pull request.
### Style Guides
For coding, refer to the [Kubernetes Coding Conventions](https://github.com/kubernetes/community/blob/master/contributors/guide/coding-conventions.md#code-conventions)
For documentation, refer to the [Kubernetes Documentation Style Guide](https://kubernetes.io/docs/contribute/style/style-guide/)
---
linkTitle: "ISO"
title: "Building the minikube ISO"
date: 2019-08-09
weight: 4
---
## Overview
The minikube ISO is booted by each hypervisor to provide a stable minimal Linux environment to start Kubernetes from. It is based on coreboot, uses systemd, and includes all necessary container runtimes and hypervisor guest drivers.
## Prerequisites
* A recent Go distribution (>=1.12)
* If you are on Windows, you'll need Docker to be installed.
* 4GB of RAM
* Build tools:
```shell
sudo apt-get install build-essential gnupg2 p7zip-full git wget cpio python \
unzip bc gcc-multilib automake libtool locales
```
Additionally, if you are on Fedora, you will need to install `glibc-static`:
```shell
sudo dnf install -y glibc-static
```
## Downloading the source
```shell
git clone https://github.com/kubernetes/minikube.git
cd minikube
```
### Building
```shell
$ make buildroot-image
$ make out/minikube.iso
```
The build will occur inside a docker container. If you want to do this on
baremetal, replace `make out/minikube.iso` with `IN_DOCKER=1 make out/minikube.iso`.
The bootable ISO image will be available in `out/minikube.iso`.
### Using a local ISO image
```shell
$ ./out/minikube start --iso-url=file://$(pwd)/out/minikube.iso
```
### Modifying buildroot components
To change which Linux userland components are included by the guest VM, use this to modify the buildroot configuration:
```shell
cd out/buildroot
make menuconfig
make
```
To save these configuration changes, execute:
```shell
make savedefconfig
```
The changes will be reflected in the `minikube-iso/configs/minikube_defconfig` file.
### Adding kernel modules
To make kernel configuration changes and save them, execute:
```shell
$ make linux-menuconfig
```
This will open the kernel configuration menu, and then save your changes to our
iso directory after they've been selected.
### Adding third-party packages
To add your own package to the minikube ISO, create a package directory under `iso/minikube-iso/package`. This directory will require at least 3 files:
`<package name>.mk` - A Makefile describing how to download the source code and build the program
`<package name>.hash` - Checksums to verify the downloaded source code
`Config.in` - buildroot configuration.
For a relatively simple example to start with, you may want to reference the `podman` package.
## Continuous Integration Builds
We publish CI builds of minikube, built at every Pull Request. Builds are available at (substitute in the relevant PR number):
- <https://storage.googleapis.com/minikube-builds/PR_NUMBER/minikube-darwin-amd64>
- <https://storage.googleapis.com/minikube-builds/PR_NUMBER/minikube-linux-amd64>
- <https://storage.googleapis.com/minikube-builds/PR_NUMBER/minikube-windows-amd64.exe>
We also publish CI builds of minikube-iso, built at every Pull Request that touches deploy/iso/minikube-iso. Builds are available at:
- <https://storage.googleapis.com/minikube-builds/PR_NUMBER/minikube-testing.iso>
---
title: "Testing"
date: 2019-07-31
weight: 4
weight: 3
description: >
How to run tests
---
......
---
title: "Commands"
linkTitle: "Command"
weight: 8
date: 2017-01-05
linkTitle: "Commands"
weight: 1
date: 2019-08-01
description: >
minikube command reference
---
{{% pageinfo %}}
This is a placeholder page where command documentation will go.
{{% /pageinfo %}}
---
title: "addons"
linkTitle: "addons"
weight: 1
date: 2019-08-01
description: >
Modifies minikube addons files using subcommands like "minikube addons enable heapster"
---
## Usage
```
minikube addons SUBCOMMAND [flags]
minikube addons [command]
```
## Subcommands
* **configure**: Configures the addon w/ADDON_NAME within minikube
* **disable**: Disables the addon w/ADDON_NAME within minikube
* **enable**: Enables the addon w/ADDON_NAME within minikube
* **list**: Lists all available minikube addons as well as their current statuses (enabled/disabled)
* **open**: Opens the addon w/ADDON_NAME within minikube
## minikube addons configure
Configures the addon w/ADDON_NAME within minikube (example: minikube addons configure registry-creds). For a list of available addons use: minikube addons list
### Usage
```
minikube addons configure ADDON_NAME [flags]
```
## minikube addons disable
Disables the addon w/ADDON_NAME within minikube (example: minikube addons disable dashboard). For a list of available addons use: minikube addons list
### Usage
```
minikube addons disable ADDON_NAME [flags]
```
## minikube addons enable
Enables the addon w/ADDON_NAME within minikube (example: minikube addons enable dashboard). For a list of available addons use: minikube addons list
### Usage
```
minikube addons enable ADDON_NAME [flags]
```
## minikube addons list
Lists all available minikube addons as well as their current statuses (enabled/disabled)
### Usage
```
minikube addons list [flags]
```
## minikube addons open
Opens the addon w/ADDON_NAME within minikube (example: minikube addons open dashboard). For a list of available addons use: minikube addons list
### Usage
```
minikube addons open ADDON_NAME [flags]
```
### Options
```
--format string Format to output addons URL in. This format will be applied to each url individually and they will be printed one at a time. (default "http://{{.IP}}:{{.Port}}")
-h, --help help for open
--https Open the addons URL with https instead of http
--interval int The time interval for each check that wait performs in seconds (default 6)
--url Display the kubernetes addons URL in the CLI instead of opening it in the default browser
--wait int Amount of time to wait for service in seconds (default 20)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "cache"
linkTitle: "cache"
weight: 1
date: 2019-08-01
description: >
Add or delete an image from the local cache.
---
### Subcommands
## minikube cache add
Add an image to local cache.
```
minikube cache add [flags]
```
## minikube cache delete
Delete an image from the local cache.
```
minikube cache delete [flags]
```
## minikube cache list
List all available images from the local cache.
```
minikube cache list [flags]
```
### Options
```
--format string Go template format string for the cache list output. The format for Go templates can be found here: https://golang.org/pkg/text/template/
For the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#CacheListTemplate (default "{{.CacheImage}}\n")
-h, --help help for list
```
---
title: "completion"
linkTitle: "completion"
weight: 1
date: 2019-08-01
description: >
Outputs minikube shell completion for the given shell (bash or zsh)
---
### Synopsis
Outputs minikube shell completion for the given shell (bash or zsh)
This depends on the bash-completion binary. Example installation instructions:
OS X:
```shell
$ brew install bash-completion
$ source $(brew --prefix)/etc/bash_completion
$ minikube completion bash > ~/.minikube-completion # for bash users
$ minikube completion zsh > ~/.minikube-completion # for zsh users
$ source ~/.minikube-completion
```
Ubuntu:
```shell
$ apt-get install bash-completion
$ source /etc/bash-completion
$ source <(minikube completion bash) # for bash users
$ source <(minikube completion zsh) # for zsh users
```
Additionally, you may want to output the completion to a file and source in your .bashrc
Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2
### Usage
```
minikube completion SHELL [flags]
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "config"
linkTitle: "config"
weight: 1
date: 2019-08-01
description: >
Modify minikube config
---
### Synopsis
config modifies minikube config files using subcommands like "minikube config set vm-driver kvm"
Configurable fields:
* vm-driver
* feature-gates
* v
* cpus
* disk-size
* host-only-cidr
* memory
* log_dir
* kubernetes-version
* iso-url
* WantUpdateNotification
* ReminderWaitPeriodInHours
* WantReportError
* WantReportErrorPrompt
* WantKubectlDownloadMsg
* WantNoneDriverWarning
* profile
* bootstrapper
* ShowDriverDeprecationNotification
* ShowBootstrapperDeprecationNotification
* dashboard
* addon-manager
* default-storageclass
* heapster
* efk
* ingress
* registry
* registry-creds
* freshpod
* default-storageclass
* storage-provisioner
* storage-provisioner-gluster
* metrics-server
* nvidia-driver-installer
* nvidia-gpu-device-plugin
* logviewer
* gvisor
* hyperv-virtual-switch
* disable-driver-mounts
* cache
* embed-certs
### subcommands
- **get**: Gets the value of PROPERTY_NAME from the minikube config file
## minikube config get
Returns the value of PROPERTY_NAME from the minikube config file. Can be overwritten at runtime by flags or environmental variables.
### Usage
```
minikube config get PROPERTY_NAME [flags]
```
## minikube config set
Sets the PROPERTY_NAME config value to PROPERTY_VALUE
These values can be overwritten by flags or environment variables at runtime.
### Usage
```
minikube config set PROPERTY_NAME PROPERTY_VALUE [flags]
```
## minikube config unset
unsets PROPERTY_NAME from the minikube config file. Can be overwritten by flags or environmental variables
### Usage
```
minikube config unset PROPERTY_NAME [flags]
```
## minikube config view
### Synopsis
Display values currently set in the minikube config file.
### Usage
```
minikube config view [flags]
```
### Options
```
--format string Go template format string for the config view output. The format for Go templates can be found here: https://golang.org/pkg/text/template/
For the list of accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd/config#ConfigViewTemplate (default "- {{.ConfigKey}}: {{.ConfigValue}}\n")
-h, --help help for view
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "dashboard"
linkTitle: "dashboard"
weight: 1
date: 2019-08-01
description: >
Access the kubernetes dashboard running within the minikube cluster
---
### Usage
```
minikube dashboard [flags]
```
### Options
```
-h, --help help for dashboard
--url Display dashboard URL instead of opening a browser
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
\ No newline at end of file
---
title: "delete"
linkTitle: "delete"
weight: 1
date: 2019-08-01
description: >
Deletes a local kubernetes cluster
---
### Synopsis
Deletes a local kubernetes cluster. This command deletes the VM, and removes all
associated files.
## Usage
```
minikube delete [flags]
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "docker-env"
linkTitle: "docker-env"
weight: 1
date: 2019-08-01
description: >
Sets up docker env variables; similar to '$(docker-machine env)'
---
### Usage
```
minikube docker-env [flags]
```
### Options
```
-h, --help help for docker-env
--no-proxy Add machine IP to NO_PROXY environment variable
--shell string Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh, bash, zsh], default is auto-detect
-u, --unset Unset variables instead of setting them
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "ip"
linkTitle: "ip"
weight: 1
date: 2019-08-01
description: >
Retrieves the IP address of the running cluster
---
### Synopsis
Retrieves the IP address of the running cluster, and writes it to STDOUT.
### Usage
```
minikube ip [flags]
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "kubectl"
linkTitle: "kubectl"
weight: 1
date: 2019-08-01
description: >
Run kubectl
---
### Synopsis
Run the kubernetes client, download it if necessary.
### Usage
```
minikube kubectl [flags]
```
### Examples:
```
minikube kubectl -- --help
kubectl get pods --namespace kube-system
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "logs"
linkTitle: "logs"
weight: 1
date: 2019-08-01
description: >
Gets the logs of the running instance, used for debugging minikube, not user code
---
## Usage
```
minikube logs [flags]
```
### Options
```
-f, --follow Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.
-h, --help help for logs
-n, --length int Number of lines back to go within the log (default 50)
--problems Show only log entries which point to known problems
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "mount"
linkTitle: "mount"
weight: 1
date: 2019-08-01
description: >
Mounts the specified directory into minikube
---
### Usage
```
minikube mount [flags] <source directory>:<target directory>
```
### Options
```
--9p-version string Specify the 9p version that the mount should use (default "9p2000.L")
--gid string Default group id used for the mount (default "docker")
-h, --help help for mount
--ip string Specify the ip that the mount should be setup on
--kill Kill the mount process spawned by minikube start
--mode uint File permissions used for the mount (default 493)
--msize int The number of bytes to use for 9p packet payload (default 262144)
--options strings Additional mount options, such as cache=fscache
--type string Specify the mount filesystem type (supported types: 9p) (default "9p")
--uid string Default user id used for the mount (default "docker")
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "profile"
linkTitle: "profile"
weight: 1
date: 2019-08-01
description: >
Profile gets or sets the current minikube profile
---
### Synopsis
profile sets the current minikube profile, or gets the current profile if no arguments are provided. This is used to run and manage multiple minikube instance. You can return to the default minikube profile by running `minikube profile default`
### Usage
```
minikube profile [MINIKUBE_PROFILE_NAME]
You can return to the default minikube profile by running `minikube profile default` [flags]
```
## Subcommands
- **list**: Lists all minikube profiles.
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
## minikube profile list
Lists all minikube profiles.
### Synopsis
Lists all valid minikube profiles and detects all possible invalid profiles.
```
minikube profile list [flags]
```
---
title: "service"
linkTitle: "service"
weight: 1
date: 2019-08-01
description: >
Gets the kubernetes URL(s) for the specified service in your local cluster
---
### Synopsis
Gets the kubernetes URL(s) for the specified service in your local cluster. In the case of multiple URLs they will be printed one at a time.
### Usage
```
minikube service [flags] SERVICE
```
### Subcommands
- **list**: Lists the URLs for the services in your local cluster
### Options
```
--format string Format to output service URL in. This format will be applied to each url individually and they will be printed one at a time. (default "http://{{.IP}}:{{.Port}}")
-h, --help help for service
--https Open the service URL with https instead of http
--interval int The time interval for each check that wait performs in seconds (default 6)
-n, --namespace string The service namespace (default "default")
--url Display the kubernetes service URL in the CLI instead of opening it in the default browser
--wait int Amount of time to wait for a service in seconds (default 20)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
## minikube service list
Lists the URLs for the services in your local cluster
```
minikube service list [flags]
```
### Options
```
-h, --help help for list
-n, --namespace string The services namespace
```
---
title: "ssh-key"
linkTitle: "sshs-key"
weight: 1
date: 2019-08-01
description: >
Retrieve the ssh identity key path of the specified cluster
---
### Usage
```
minikube ssh-key [flags]
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "ssh"
linkTitle: "ssh"
weight: 1
date: 2019-08-01
description: >
Log into or run a command on a machine with SSH; similar to 'docker-machine ssh'
---
### Usage
```
minikube ssh [flags]
```
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "start"
linkTitle: "start"
weight: 1
date: 2019-08-01
description: >
Starts a local kubernetes cluster
---
### Usage
```
minikube start [flags]
```
### Options
```
--apiserver-ips ipSlice A set of apiserver IP Addresses which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine (default [])
--apiserver-name string The apiserver name which is used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine (default "minikubeCA")
--apiserver-names stringArray A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine
--apiserver-port int The apiserver listening port (default 8443)
--cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --vm-driver=none. (default true)
--container-runtime string The container runtime to be used (docker, crio, containerd) (default "docker")
--cpus int Number of CPUs allocated to the minikube VM (default 2)
--cri-socket string The cri socket path to be used
--disk-size string Disk size allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or g) (default "20000mb")
--dns-domain string The cluster dns domain name used in the kubernetes cluster (default "cluster.local")
--dns-proxy Enable proxy for NAT DNS requests (virtualbox)
--docker-env stringArray Environment variables to pass to the Docker daemon. (format: key=value)
--docker-opt stringArray Specify arbitrary flags to pass to the Docker daemon. (format: key=value)
--download-only If true, only download and cache files for later use - don't install or start anything.
--enable-default-cni Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with "--network-plugin=cni"
--extra-config ExtraOption A set of key=value pairs that describe configuration that may be passed to different components.
The key should be '.' separated, and the first part before the dot is the component to apply the configuration to.
Valid components are: kubelet, kubeadm, apiserver, controller-manager, etcd, proxy, scheduler
Valid kubeadm parameters: ignore-preflight-errors, dry-run, kubeconfig, kubeconfig-dir, node-name, cri-socket, experimental-upload-certs, certificate-key, rootfs, pod-network-cidr
--feature-gates string A set of key=value pairs that describe feature gates for alpha/experimental features.
-h, --help help for start
--host-dns-resolver Enable host resolver for NAT DNS requests (virtualbox) (default true)
--host-only-cidr string The CIDR to be used for the minikube VM (only supported with Virtualbox driver) (default "192.168.99.1/24")
--hyperkit-vpnkit-sock string Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSock.
--hyperkit-vsock-ports strings List of guest VSock ports that should be exposed as sockets on the host (Only supported on with hyperkit now).
--hyperv-virtual-switch string The hyperv virtual switch name. Defaults to first found. (only supported with HyperV driver)
--image-mirror-country string Country code of the image mirror to be used. Leave empty to use the global one. For Chinese mainland users, set it to cn
--image-repository string Alternative image repository to pull docker images from. This can be used when you have limited access to gcr.io. Set it to "auto" to let minikube decide one for you. For Chinese mainland users, you may use local gcr.io mirrors such as registry.cn-hangzhou.aliyuncs.com/google_containers
--insecure-registry strings Insecure Docker registries to pass to the Docker daemon. The default service CIDR range will automatically be added.
--iso-url string Location of the minikube iso (default "https://storage.googleapis.com/minikube/iso/minikube-v1.2.0.iso")
--keep-context This will keep the existing kubectl context and will create a minikube context.
--kubernetes-version string The kubernetes version that the minikube VM will use (ex: v1.2.3) (default "v1.15.1")
--kvm-gpu Enable experimental NVIDIA GPU support in minikube
--kvm-hidden Hide the hypervisor signature from the guest in minikube
--kvm-network string The KVM network name. (only supported with KVM driver) (default "default")
--kvm-qemu-uri string The KVM QEMU connection URI. (works only with kvm2 driver on linux) (default "qemu:///system")
--memory string Amount of RAM allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or g) (default "2000mb")
--mount This will start the mount daemon and automatically mount files into minikube
--mount-string string The argument to pass the minikube mount command on start (default "/Users:/minikube-host")
--network-plugin string The name of the network plugin
--nfs-share strings Local folders to share with Guest via NFS mounts (Only supported on with hyperkit now)
--nfs-shares-root string Where to root the NFS Shares (defaults to /nfsshares, only supported with hyperkit now) (default "/nfsshares")
--no-vtx-check Disable checking for the availability of hardware virtualization before the vm is started (virtualbox)
--registry-mirror strings Registry mirrors to pass to the Docker daemon
--service-cluster-ip-range string The CIDR to be used for service cluster IPs. (default "10.96.0.0/12")
--uuid string Provide VM UUID to restore MAC address (only supported with Hyperkit driver).
--vm-driver string VM driver is one of: [virtualbox parallels vmwarefusion hyperkit vmware] (default "virtualbox")
--wait Wait until Kubernetes core services are healthy before exiting (default true)
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "status"
linkTitle: "status"
weight: 1
date: 2019-08-01
description: >
Gets the status of a local kubernetes cluster
---
### Synopsis
Gets the status of a local kubernetes cluster.
Exit status contains the status of minikube's VM, cluster and kubernetes encoded on it's bits in this order from right to left.
Eg: 7 meaning: 1 (for minikube NOK) + 2 (for cluster NOK) + 4 (for kubernetes NOK)
### Usage
```
minikube status [flags]
```
### Options
```
--format string Go template format string for the status output. The format for Go templates can be found here: https://golang.org/pkg/text/template/
For the list accessible variables for the template, see the struct values here: https://godoc.org/k8s.io/minikube/cmd/minikube/cmd#Status (default "host: {{.Host}}\nkubelet: {{.Kubelet}}\napiserver: {{.APIServer}}\nkubectl: {{.Kubeconfig}}\n")
-h, --help help for status
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "stop"
linkTitle: "stop"
weight: 1
date: 2019-08-01
description: >
Stops a running local kubernetes cluster
---
### Synopsis
Stops a local kubernetes cluster running in Virtualbox. This command stops the VM
itself, leaving all files intact. The cluster can be started again with the "start" command.
### Usage
```
minikube stop [flags]
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "tunnel"
linkTitle: "tunnel"
weight: 1
date: 2019-08-01
description: >
tunnel makes services of type LoadBalancer accessible on localhost
---
### Synopsis
tunnel creates a route to services deployed with type LoadBalancer and sets their Ingress to their ClusterIP
### Usage
```
minikube tunnel [flags]
```
### Options
```
-c, --cleanup call with cleanup=true to remove old tunnels
-h, --help help for tunnel
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "update-check"
linkTitle: "update-check"
weight: 1
date: 2019-08-01
description: >
Print current and latest version number
---
### Usage
```
minikube update-check [flags]
```
---
title: "update-context"
linkTitle: "update-context"
weight: 1
date: 2019-08-01
description: >
Verify the IP address of the running cluster in kubeconfig.
---
### Synopsis
Retrieves the IP address of the running cluster, checks it with IP in kubeconfig, and corrects kubeconfig if incorrect.
### Usage
```
minikube update-context [flags]
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
## minikube version
Print the version of minikube
### Synopsis
Print the version of minikube.
```
minikube version [flags]
```
### Options
```
-h, --help help for version
```
### Options inherited from parent commands
```
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used. This can be set to allow having multiple instances of minikube independently. (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
---
title: "Configuration"
linkTitle: "Configuration"
weight: 1
date: 2019-08-01
description: >
minikube configuration reference
---
\ No newline at end of file
---
title: "Kubernetes"
linkTitle: "Kubernetes"
weight: 3
date: 2019-08-01
description: >
Kubernetes configuration reference
---
minikube allows users to configure the Kubernetes components with arbitrary values. To use this feature, you can use the `--extra-config` flag on the `minikube start` command.
This flag is repeated, so you can pass it several times with several different values to set multiple options.
## Selecting a Kubernetes version
minikube defaults to the latest stable version of Kubernetes. You may select a different Kubernetes release by using the `--kubernetes-version` flag, for example:
`minikube start --kubernetes-version=v1.10.13`
minikube follows the [Kubernetes Version and Version Skew Support Policy](https://kubernetes.io/docs/setup/version-skew-policy/), so we guarantee support for the latest build for the last 3 minor Kubernetes releases. When practical, minikube extends this policy two additional minor releases so that users can emulate legacy environments.
As of April 2019, this means that minikube supports and actively tests against the latest builds of:
* v1.14 (default)
* v1.13
* v1.12
* v1.11 (best effort)
* v1.10 (best effort)
For more up to date information, see `OldestKubernetesVersion` and `NewestKubernetesVersion` in [constants.go](https://github.com/kubernetes/minikube/blob/master/pkg/minikube/constants/constants.go)
## Modifying Kubernetes defaults
The kubeadm bootstrapper can be configured by the `--extra-config` flag on the `minikube start` command. It takes a string of the form `component.key=value` where `component` is one of the strings
* kubeadm
* kubelet
* apiserver
* controller-manager
* scheduler
and `key=value` is a flag=value pair for the component being configured. For example,
```shell
minikube start --extra-config=apiserver.v=10 --extra-config=kubelet.max-pods=100
```
For instance, to allow Kubernetes to launch on an unsupported Docker release:
```shell
minikube start --extra-config=kubeadm.ignore-preflight-errors=SystemVerification
```
\ No newline at end of file
---
title: "minikube"
linkTitle: "minikube"
weight: 2
date: 2019-08-01
description: >
minikube configuration reference
---
## Flags
Most minikube configuration is done via the flags interface. To see which flags are possible for the start command, run:
```shell
minikube start --help
```
For example:
```shell
minikube start --apiserver-port 9999
```
Many of these flags are also available to be set via persistent configuration or environment variables.
While most flags are applicable to any command, some are globally scoped:
```
Flags:
--alsologtostderr log to standard error as well as files
-b, --bootstrapper string The name of the cluster bootstrapper that will set up the kubernetes cluster. (default "kubeadm")
-h, --help help for minikube
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
-p, --profile string The name of the minikube VM being used.
This can be modified to allow for multiple minikube instances to be run independently (default "minikube")
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
## Persistent Configuration
minikube allows users to persistently store new default values to be used across all profiles, using the `minikube config` command. This is done providing a property name, and a property value.
### Listing config properties
```shell
minikube config
```
Example:
```shell
Configurable fields:
* vm-driver
* feature-gates
* v
* cpus
* disk-size
* host-only-cidr
* memory
* log_dir
* kubernetes-version
* iso-url
* WantUpdateNotification
* ReminderWaitPeriodInHours
* WantReportError
* WantReportErrorPrompt
* WantKubectlDownloadMsg
* WantNoneDriverWarning
* profile
* bootstrapper
* ShowDriverDeprecationNotification
* ShowBootstrapperDeprecationNotification
* dashboard
* addon-manager
* default-storageclass
* heapster
* efk
* ingress
* registry
* registry-creds
* freshpod
* default-storageclass
* storage-provisioner
* storage-provisioner-gluster
* metrics-server
* nvidia-driver-installer
* nvidia-gpu-device-plugin
* logviewer
* gvisor
* hyperv-virtual-switch
* disable-driver-mounts
* cache
* embed-certs
```
### Listing your property overrides
```shell
minikube config view
```
Example output:
```shell
- memory: 4096
- registry: true
- vm-driver: vmware
- dashboard: true
- gvisor: true
```
### Setting a new property override
```shell
minikube config set <key> <value>
```
For example:
```shell
minikube config set vm-driver hyperkit
```
## Environment Configuration
### Config 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:
* **MINIKUBE_HOME** - (string) sets the path for the .minikube directory that minikube uses for state/configuration
* **MINIKUBE_IN_STYLE** - (bool) manually sets whether or not emoji and colors should appear in minikube. Set to false or 0 to disable this feature, true or 1 to force it to be turned on.
* **MINIKUBE_WANTUPDATENOTIFICATION** - (bool) sets whether the user wants an update notification for new minikube versions
* **MINIKUBE_REMINDERWAITPERIODINHOURS** - (int) sets the number of hours to check for an update notification
* **CHANGE_MINIKUBE_NONE_USER** - (bool) automatically change ownership of ~/.minikube to the value of $SUDO_USER
* **MINIKUBE_ENABLE_PROFILING** - (int, `1` enables it) enables trace profiling to be generated for minikube
### Making environment variables persistent
To make the exported variables persistent:
* 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_STYLE=false
minikube start
```
---
title: "Networking"
linkTitle: "Networking"
weight: 8
date: 2017-01-05
weight: 6
date: 2018-08-01
description: >
Configuring networking with minikube
How minikube interacts with networks.
---
Since minikube runs all services within a VM environment, networking gets pretty complicated. Networking is both a popular topic among power users, and the most common cause for failed minikube deployments.
Since minikube runs everything from within a VM, networking can get fairly complicated.
\ No newline at end of file
---
title: "Proxy Support"
linkTitle: "Proxy Support"
weight: 6
date: 2017-01-05
description: >
How to use an HTTP proxy with minikube
---
minikube requires access to the internet via HTTP, HTTPS, and DNS protocols. If a HTTP proxy is required to access the internet, you may need to pass the proxy connection information to both minikube and Docker using environment variables:
* `HTTP_PROXY` - The URL to your HTTP proxy
* `HTTPS_PROXY` - The URL to your HTTPS proxy
* `NO_PROXY` - A comma-separated list of hosts which should not go through the proxy.
The NO_PROXY variable here is important: Without setting it, minikube may not be able to access resources within the VM. minikube uses two IP ranges, which should not go through the proxy:
* **192.168.99.0/24**: Used by the minikube VM. Configurable for some hypervisors via `--host-only-cidr`
* **192.168.39.0/24**: Used by the minikube kvm2 driver.
* **10.96.0.0/12**: Used by service cluster IP's. Configurable via `--service-cluster-ip-range`
One important note: If NO_PROXY is required by non-Kubernetes applications, such as Firefox or Chrome, you may want to specifically add the minikube IP to the comma-separated list, as they may not understand IP ranges ([#3827](https://github.com/kubernetes/minikube/issues/3827)).
## Example Usage
### macOS and Linux
```shell
export HTTP_PROXY=http://<proxy hostname:port>
export HTTPS_PROXY=https://<proxy hostname:port>
export NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.0/24,192.168.39.0/24
minikube start
```
To make the exported variables permanent, consider adding the declarations to ~/.bashrc or wherever your user-set environment variables are stored.
### Windows
```shell
set HTTP_PROXY=http://<proxy hostname:port>
set HTTPS_PROXY=https://<proxy hostname:port>
set NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.99.1/24,192.168.39.0/24
minikube start
```
To set these environment variables permanently, consider adding these to your [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)
## Configuring Docker to use a proxy
As of v1.0, minikube automatically configures the Docker instance inside of the VM to use the proxy environment variables, unless you have specified a `--docker-env` override. If you need to manually configure Docker for a set of proxies, use:
```shell
minikube start \
--docker-env=HTTP_PROXY=$HTTP_PROXY \
--docker-env HTTPS_PROXY=$HTTPS_PROXY \
--docker-env NO_PROXY=$NO_PROXY
```
## Troubleshooting
### unable to cache ISO... connection refused
```text
Unable to start VM: unable to cache ISO: https://storage.googleapis.com/minikube/iso/minikube.iso:
failed to download: failed to download to temp file: download failed: 5 error(s) occurred:
* Temporary download error: Get https://storage.googleapis.com/minikube/iso/minikube.iso:
proxyconnect tcp: dial tcp <host>:<port>: connect: connection refused
```
This error indicates that the host:port combination defined by HTTPS_PROXY or HTTP_PROXY is incorrect, or that the proxy is unavailable.
## Unable to pull images..Client.Timeout exceeded while awaiting headers
```text
Unable to pull images, which may be OK:
failed to pull image "k8s.gcr.io/kube-apiserver:v1.13.3": output: Error response from daemon:
Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection
(Client.Timeout exceeded while awaiting headers)
```
This error indicates that the container runtime running within the VM does not have access to the internet. Verify that you are passing the appropriate value to `--docker-env HTTPS_PROXY`.
## x509: certificate signed by unknown authority
```text
[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.13.3:
output: Error response from daemon:
Get https://k8s.gcr.io/v2/: x509: certificate signed by unknown authority
```
This is because minikube VM is stuck behind a proxy that rewrites HTTPS responses to contain its own TLS certificate. The [solution](https://github.com/kubernetes/minikube/issues/3613#issuecomment-461034222) is to install the proxy certificate into a location that is copied to the VM at startup, so that it can be validated.
Ask your IT department for the appropriate PEM file, and add it to:
`~/.minikube/files/etc/ssl/certs`
Then run `minikube delete` and `minikube start`.
## downloading binaries: proxyconnect tcp: tls: oversized record received with length 20527
The supplied value of `HTTPS_PROXY` is probably incorrect. Verify that this value is not pointing to an HTTP proxy rather than an HTTPS proxy.
## Additional Information
* [Configure Docker to use a proxy server](https://docs.docker.com/network/proxy/)
---
title: "VPN Support"
linkTitle: "VPN Support"
weight: 6
date: 2019-08-01
description: >
How to use a VPN with minikube
---
minikube requires access from the host to the following IP ranges:
* **192.168.99.0/24**: Used by the minikube VM. Configurable for some hypervisors via `--host-only-cidr`
* **192.168.39.0/24**: Used by the minikube kvm2 driver.
* **10.96.0.0/12**: Used by service cluster IP's. Configurable via `--service-cluster-ip-range`
Unfortunately, many VPN configurations route packets to these destinations through an encrypted tunnel, rather than allowing the packets to go to the minikube VM.
### Possible workarounds
1. If you have access, whitelist the above IP ranges in your VPN software
2. In your VPN software, select an option similar to "Allow local (LAN) access when using VPN" [(Cisco VPN example)](https://superuser.com/questions/987150/virtualbox-guest-os-through-vpn)
3. You may have luck selecting alternate values to the `--host-only-cidr` and `--service-cluster-ip-range` flags.
4. Turn off the VPN
---
title: "Reference"
linkTitle: "Reference"
weight: 9
weight: 3
description: >
Low level reference docs
---
{{% pageinfo %}}
This is a placeholder page that shows you how to use this template site.
{{% /pageinfo %}}
If your project has an API, configuration, or other reference - anything that users need to look up that’s at an even lower level than a single task - put (or link to it) here.
---
title: "Caching"
linkTitle: "Caching"
weight: 6
date: 2019-08-01
description: >
Cache Rules Everything Around Minikube
---
minikube has built-in support for caching downloaded resources into `$MINIKUBE_HOME/cache`. Here are the important file locations:
* `~/.minikube/cache` - Top-level folder
* `~/.minikube/cache/iso` - VM ISO image. Typically updated once per major minikube release.
* `~/.minikube/cache/images` - Docker images used by Kubernetes.
* `~/.minikube/cache/<version>` - Kubernetes binaries, such as `kubeadm` and `kubelet`
## Caching arbitrary Docker images
minikube supports caching arbitrary images using the `minikube cache` command. Cached images are stored in `$MINIKUBE_HOME/cache/images`, and loaded into the VM's container runtime on `minikube start`.
### Adding an image
```shell
minikube cache add ubuntu:16.04
```
### Listing images
```shell
minikube cache list
```
### Deleting an image
```shell
minikube cache delete <image name>
```
## Built-in Kubernetes image caching
`minikube start` caches all required Kubernetes images by default. This default may be changed by setting `--cache-images=false`. These images are not displayed by the `minikube cache` command.
## Sharing the minikube cache
For offline use on other hosts, one can copy the contents of `~/.minikube/cache`. As of the v1.0 release, this directory contains 685MB of data:
```text
cache/iso/minikube-v1.0.0.iso
cache/images/gcr.io/k8s-minikube/storage-provisioner_v1.8.1
cache/images/k8s.gcr.io/k8s-dns-sidecar-amd64_1.14.13
cache/images/k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64_1.14.13
cache/images/k8s.gcr.io/kubernetes-dashboard-amd64_v1.10.1
cache/images/k8s.gcr.io/kube-scheduler_v1.14.0
cache/images/k8s.gcr.io/coredns_1.3.1
cache/images/k8s.gcr.io/kube-controller-manager_v1.14.0
cache/images/k8s.gcr.io/kube-apiserver_v1.14.0
cache/images/k8s.gcr.io/pause_3.1
cache/images/k8s.gcr.io/etcd_3.3.10
cache/images/k8s.gcr.io/kube-addon-manager_v9.0
cache/images/k8s.gcr.io/k8s-dns-kube-dns-amd64_1.14.13
cache/images/k8s.gcr.io/kube-proxy_v1.14.0
cache/v1.14.0/kubeadm
cache/v1.14.0/kubelet
```
If any of these files exist, minikube will use copy them into the VM directly rather than pulling them from the internet.
---
title: "Persistent Volumes"
linkTitle: "Persistent Volumes"
weight: 6
date: 2019-08-01
description: >
About persistent volumes (hostPath)
---
minikube supports [PersistentVolumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) of type `hostPath` out of the box. These PersistentVolumes are mapped to a directory inside the running Minikube instance (usually a VM, unless you use `--vm-driver=none`). For more information on how this works, read the Dynamic Provisioning section below.
## A note on mounts, persistence, and minikube hosts
minikube is configured to persist files stored under the following directories, which are made in the Minikube VM (or on your localhost if running on bare metal). You may lose data from other directories on reboots.
* `/data`
* `/var/lib/minikube`
* `/var/lib/docker`
* `/tmp/hostpath_pv`
* `/tmp/hostpath-provisioner`
Here is an example PersistentVolume config to persist data in the '/data' directory:
```yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv0001
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 5Gi
hostPath:
path: /data/pv0001/
```
You can also achieve persistence by creating a PV in a mounted host folder.
## Dynamic provisioning and CSI
In addition, minikube implements a very simple, canonical implementation of dynamic storage controller that runs alongside its deployment. This manages provisioning of *hostPath* volumes (rather then via the previous, in-tree hostPath provider).
The default [Storage Provisioner Controller](https://github.com/kubernetes/minikube/blob/master/pkg/storage/storage_provisioner.go) is managed internally, in the minikube codebase, demonstrating how easy it is to plug a custom storage controller into kubernetes as a storage component of the system, and provides pods with dynamically, to test your pod's behaviour when persistent storage is mapped to it.
Note that this is not a CSI based storage provider, rather, it simply declares a PersistentVolume object of type hostpath dynamically when the controller see's that there is an outstanding storage request.
---
title: "Container Runtimes"
linkTitle: "Container Runtimes"
weight: 6
date: 2019-08-01
description: >
Available container runtimes
---
### Docker
The default container runtime in minikube is Docker. You can select it explicitly by using:
```shell
minikube start --container-runtime=docker
```
### CRI-O
To use [CRI-O](https://github.com/kubernetes-sigs/cri-o):
```shell
minikube start --container-runtime=cri-o
```
## containerd
To use [containerd](https://github.com/containerd/containerd):
```shell
minikube start --container-runtime=containerd
```
## gvisor
To use [gvisor](https://gvisor.dev):
```shell
minikube start --container-runtime=containerd
minikube addons enable gvisor
```
## Kata
Native support for [Kata containers](https://katacontainers.io) is a work-in-progress. See [#4347](https://github.com/kubernetes/minikube/issues/4347) for details.
In the mean time, it's possible to make Kata containers work within minikube using a bit of [elbow grease](https://gist.github.com/olberger/0413cfb0769dcdc34c83788ced583fa9).
---
title: "Working with Registries"
linkTitle: "Working with Registries"
weight: 6
date: 2017-01-05
description: >
How to interact with Docker registries.
---
\ No newline at end of file
---
title: "Insecure"
linkTitle: "Insecure"
weight: 6
date: 2019-08-1
description: >
How to enable insecure registry support within minikube
---
minikube allows users to configure the docker engine's `--insecure-registry` flag.
You can use the `--insecure-registry` flag on the
`minikube start` command to enable insecure communication between the docker engine and registries listening to requests from the CIDR range.
One nifty hack is to allow the kubelet running in minikube to talk to registries deployed inside a pod in the cluster without backing them
with TLS certificates. Because the default service cluster IP is known to be available at 10.0.0.1, users can pull images from registries
deployed inside the cluster by creating the cluster with `minikube start --insecure-registry "10.0.0.0/24"`.
---
title: "Private"
linkTitle: "Private"
weight: 6
date: 2019-08-01
description: >
How to use a private registry within minikube
---
**GCR/ECR/Docker**: minikube has an addon, `registry-creds` which maps credentials into minikube to support pulling from Google Container Registry (GCR), Amazon's EC2 Container Registry (ECR), and Private Docker registries. You will need to run `minikube addons configure registry-creds` and `minikube addons enable registry-creds` to get up and running. An example of this is below:
```shell
$ minikube addons configure registry-creds
Do you want to enable AWS Elastic Container Registry? [y/n]: n
Do you want to enable Google Container Registry? [y/n]: y
-- Enter path to credentials (e.g. /home/user/.config/gcloud/application_default_credentials.json):/home/user/.config/gcloud/application_default_credentials.json
Do you want to enable Docker Registry? [y/n]: n
registry-creds was successfully configured
$ minikube addons enable registry-creds
```
For additional information on private container registries, see [this page](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/).
We recommend you use _ImagePullSecrets_, but if you would like to configure access on the minikube VM you can place the `.dockercfg` in the `/home/docker` directory or the `config.json` in the `/var/lib/kubelet` directory. Make sure to restart your kubelet (for kubeadm) process with `sudo systemctl restart kubelet`.
......@@ -7,14 +7,6 @@ description: >
What can you do with minikube?
---
{{% pageinfo %}}
This is a placeholder page that shows you how to use this template site.
{{% /pageinfo %}}
Think about your project’s features and use cases. Use these to choose your core tasks. Each granular use case (enable x, configure y) should have a corresponding tasks page or tasks page section. Users should be able to quickly refer to your core tasks when they need to find out how to do one specific thing, rather than having to look for the instructions in a bigger tutorial or example. Think of your tasks pages as a cookbook with different procedures your users can combine to create something more substantial.
You can give each task a page, or you can group related tasks together in a page, such as tasks related to a particular feature. As well as grouping related tasks in single pages, you can also group task pages in nested folders with an index page as an overview, as seen in this example site. Or if you have a small docset like the [Docsy User Guide](https://docsy.dev/docs/) with no Tutorials or Concepts pages, consider adding your feature-specific pages at the top level of your docs rather than in a Tasks section.
Each task should give the user
* The prerequisites for this task, if any (this can be specified at the top of a multi-task page if they're the same for all the page's tasks. "All these tasks assume that you understand....and that you have already....").
......
---
title: "Debugging"
linkTitle: "Debugging"
weight: 9
date: 2019-08-01
description: >
How to debug issues within minikube
---
## Enabling debug logs
To debug issues with minikube (not *Kubernetes* but **minikube** itself), you can use the `-v` flag to see debug level info. The specified values for `-v` will do the following (the values are all encompassing in that higher values will give you all lower value outputs as well):
* `--v=0` will output **INFO** level logs
* `--v=1` will output **WARNING** level logs
* `--v=2` will output **ERROR** level logs
* `--v=3` will output *libmachine* logging
* `--v=7` will output *libmachine --debug* level logging
Example:
`minikube start --v=7` will start minikube and output all the important debug logs to stdout.
## Gathering VM logs
To debug issues where Kubernetes failed to deploy, it is very useful to collect the Kubernetes pod and kernel logs:
```shell
minikube logs
```
## Viewing Pod Status
To view the deployment state of all Kubernetes pods, use:
```shell
kubectl get po -A
```
Example output:
```shell
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-5c98db65d4-299md 1/1 Running 0 11m
kube-system coredns-5c98db65d4-qlpkd 1/1 Running 0 11m
kube-system etcd-minikube 1/1 Running 0 10m
kube-system gvisor 1/1 Running 0 11m
...
kube-system storage-provisioner 1/1 Running 0 11m
```
To view more detailed information about a pod, use:
```shell
kubectl describe pod <name> -n <namespace>
```
## Debugging hung start-up
minikube will wait ~8 minutes before giving up on a Kubernetes deployment. If you want to see startup fails more immediately, consider using:
```shell
minikube logs --problems
```
This will attempt to surface known errors, such as invalid configuration flags. If nothing interesting shows up, try `minikube logs`.
---
title: "File Sync"
linkTitle: "File Sync"
weight: 6
date: 2019-08-01
description: >
How to sync files into minikube
---
## Built-in sync
minikube has a built-in file sync mechanism, but it only syncs when `minikube start` is run, though before Kubernetes is started. Examples where this may be useful are custom versions of system or Kubernetes configuration files, such as:
- DNS configuration
- SSL certificates
- Kubernetes service metadata
### Adding files
Place files to be synced in `$MINIKUBE_HOME/files`
For example, running the following will result in the deployment of a custom /etc/resolv.conf:
```
mkdir -p ~/.minikube/files/etc
echo nameserver 8.8.8.8 > ~/.minikube/files/etc/resolv.conf
minikube start
```
## Other approaches
With a bit of work, one could setup [Syncthing](https://syncthing.net) between the host and the guest VM for persistent file synchronization.
If you are looking for a solution tuned for iterative application development, consider using a Kubernetes tool that is known to work well with minikube:
- [Draft](https://draft.sh): see specific [minikube instructions](https://github.com/Azure/draft/blob/master/docs/install-minikube.md)
- [Oketo](https://github.com/okteto/okteto)
- [Skaffold](http://github.com/ContainerTools/skaffold)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册