Massive reorganization

pull/7329/head
Thomas Stromberg 2020-03-30 21:35:07 -07:00
parent ea5e399b48
commit e9e1a77fec
102 changed files with 518 additions and 1093 deletions

View File

@ -69,9 +69,9 @@ A single command away from reproducing your production environment, from the com
{{< blocks/section color="white" >}}
{{% blocks/feature icon="fa-star" title="Developer focused" %}}
- [LoadBalancer emulation](https://minikube.sigs.k8s.io/docs/tasks/loadbalancer/)
- [Addons Marketplace](https://minikube.sigs.k8s.io/docs/tasks/addons/)
- [Integrated Dashboard](https://minikube.sigs.k8s.io/docs/tasks/dashboard/)
- [LoadBalancer emulation](https://minikube.sigs.k8s.io/docs/Handbook/loadbalancer/)
- [Addons Marketplace](https://minikube.sigs.k8s.io/docs/Handbook/addons/)
- [Integrated Dashboard](https://minikube.sigs.k8s.io/docs/Handbook/dashboard/)
- [GPU support](https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/)
- Reusable Docker daemon
{{% /blocks/feature %}}

View File

@ -1,13 +0,0 @@
---
title: "Docsy Blog"
linkTitle: "News"
menu:
main:
weight: 30
---
This is the **blog** section. It has two categories: News and Releases.
Files in these directories will be listed in reverse chronological order.

View File

@ -1,8 +0,0 @@
---
title: "News About Docsy"
linkTitle: "News"
weight: 20
---

View File

@ -1,12 +0,0 @@
---
title: "New website launched"
date: 2019-08-13
description: >
About the new minikube website
---
As you may have noticed, minikube has a brand new website.
As part of our [2019 roadmap](https://minikube.sigs.k8s.io/docs/contributing/roadmap/), we identified the need for a user-focused website for documentation, and this is it. It's based on the [Hugo Website Framework](https://gohugo.io/) and uses the [Docsy Templates for Technical Documentation](https://github.com/google/docsy).
We have more work to do with organizing the documentation and making it more useful, but we hope you are able to enjoy the fruits of our labor. PR's welcome!

View File

@ -1,8 +0,0 @@
---
title: "New Releases"
linkTitle: "Releases"
weight: 20
---

View File

@ -1,26 +0,0 @@
---
title: "v1.3.1"
linkTitle: "v1.3.1 released"
date: 2019-08-13
description: >
Release notes for v1.3.1
---
minikube v1.3.1 is now available, which addresses regressions found in the v1.3.0 release. Here are the [changes](https://raw.githubusercontent.com/kubernetes/minikube/v1.3.1/CHANGELOG.md)
* Update code references to point to new documentation site [#5052](https://github.com/kubernetes/minikube/pull/5052)
* Localization support for help text [#4814](https://github.com/kubernetes/minikube/pull/4814)
* Upgrade cheggaaa/pb from v1.0.27 to v3.0.1 [#5025](https://github.com/kubernetes/minikube/pull/5025)
* Restore --disable-driver-mounts flag [#5026](https://github.com/kubernetes/minikube/pull/5026)
* Fixed the template for dashboard output [#5004](https://github.com/kubernetes/minikube/pull/5004)
* Use a temp dest to atomically download the iso [#5000](https://github.com/kubernetes/minikube/pull/5000)
Thank you to our merry band of contributors for assembling this last minute bug fix release.
- Jituri, Pranav
- Medya Ghazizadeh
- Pranav Jituri
- Ramiro Berrelleza
- Sharif Elgamal
- Thomas Strömberg
- josedonizetti

View File

@ -1,7 +0,0 @@
---
title: "Concepts"
linkTitle: "Concepts"
weight: 4
description: >
Concepts that users and contributors should be aware of.
---

View File

@ -11,7 +11,7 @@ description: >
The Docker driver is the newest minikube driver. which runs kubernetes in container VM-free ! with full feature parity with minikube in VM.
{{% readfile file="/docs/Reference/Drivers/includes/docker_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/docker_usage.inc" %}}
## Special features

View File

@ -11,7 +11,7 @@ description: >
[HyperKit](https://github.com/moby/hyperkit) is an open-source hypervisor for macOS hypervisor, optimized for lightweight virtual machines and container deployment.
{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/hyperkit_usage.inc" %}}
## Special features

View File

@ -11,7 +11,7 @@ description: >
Hyper-V is a native hypervisor built in to modern versions of Microsoft Windows.
{{% readfile file="/docs/Reference/Drivers/includes/hyperv_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/hyperv_usage.inc" %}}
## Special features

View File

@ -1,7 +1,7 @@
## experimental
This is an experimental driver. please use it only for experimental reasons.
for a better kubernetes in container experience, use docker [driver](https://minikube.sigs.k8s.io/docs/reference/drivers/docker).
for a better kubernetes in container experience, use docker [driver](https://minikube.sigs.k8s.io/docs/Drivers/docker).
## Install Podman

View File

@ -13,11 +13,11 @@ description: >
[KVM (Kernel-based Virtual Machine)](https://www.linux-kvm.org/page/Main_Page) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions. To work with KVM, minikube uses the [libvirt virtualization API](https://libvirt.org/)
{{% readfile file="/docs/Reference/Drivers/includes/kvm2_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/kvm2_usage.inc" %}}
## Check virtualization support
{{% readfile file="/docs/Reference/Drivers/includes/check_virtualization_linux.inc" %}}
{{% readfile file="/docs/Drivers/includes/check_virtualization_linux.inc" %}}
## Special features

View File

@ -12,7 +12,7 @@ description: >
This document is written for system integrators who are familiar with minikube, and wish to run it within a customized VM environment. The `none` driver allows advanced minikube users to skip VM creation, allowing minikube to be run on a user-supplied VM.
{{% readfile file="/docs/Reference/Drivers/includes/none_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/none_usage.inc" %}}
## Issues

View File

@ -11,7 +11,7 @@ description: >
The Parallels driver is particularly useful for users who own Parallels Desktop, as it does not require VT-x hardware support.
{{% readfile file="/docs/Reference/Drivers/includes/parallels_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/parallels_usage.inc" %}}
## Issues

View File

@ -9,7 +9,7 @@ description: >
## Overview
The podman driver is another kubernetes in container driver for minikube. simmilar to [docker](https://minikube.sigs.k8s.io/docs/reference/drivers/docker/) driver.
The podman driver is another kubernetes in container driver for minikube. simmilar to [docker](https://minikube.sigs.k8s.io/docs/Drivers/docker/) driver.
podman driver is currently experimental.
and only supported on Linux and MacOs (with a remote podman server)
@ -20,7 +20,7 @@ minikube start --driver=podman --container-runtime=cri-o
```
{{% readfile file="/docs/Reference/Drivers/includes/podman_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/podman_usage.inc" %}}

View File

@ -11,7 +11,7 @@ description: >
VirtualBox is the oldest and most stable VM driver for minikube.
{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/virtualbox_usage.inc" %}}
## Special features

View File

@ -13,7 +13,7 @@ The vmware driver supports virtualization across all VMware based hypervisors.
{{% tabs %}}
{{% tab "macOS" %}}
{{% readfile file="/docs/Reference/Drivers/includes/vmware_macos_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/vmware_macos_usage.inc" %}}
{{% /tab %}}
{{% tab "Linux" %}}
No documentation is available yet.

View File

@ -0,0 +1,7 @@
---
title: "Installation"
linkTitle: "Installation"
weight: 1
description: >
How to install minikube
---

View File

@ -44,34 +44,34 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-{{< la
{{% tabs %}}
{{% tab "Docker" %}}
## Check container support
{{% readfile file="/docs/Reference/Drivers/includes/docker_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/docker_usage.inc" %}}
{{% /tab %}}
{{% tab "KVM" %}}
## Check virtualization support
{{% readfile file="/docs/Reference/Drivers/includes/check_virtualization_linux.inc" %}}
{{% readfile file="/docs/Drivers/includes/check_virtualization_linux.inc" %}}
{{% readfile file="/docs/Reference/Drivers/includes/kvm2_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/kvm2_usage.inc" %}}
{{% /tab %}}
{{% tab "VirtualBox" %}}
## Check virtualization support
{{% readfile file="/docs/Reference/Drivers/includes/check_virtualization_linux.inc" %}}
{{% readfile file="/docs/Drivers/includes/check_virtualization_linux.inc" %}}
{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/virtualbox_usage.inc" %}}
{{% /tab %}}
{{% tab "None (bare-metal)" %}}
## Check baremetal support
{{% readfile file="/docs/Reference/Drivers/includes/check_baremetal_linux.inc" %}}
{{% readfile file="/docs/Drivers/includes/check_baremetal_linux.inc" %}}
If you are already running minikube from inside a VM, it is possible to skip the creation of an additional VM layer by using the `none` driver.
{{% readfile file="/docs/Reference/Drivers/includes/none_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/none_usage.inc" %}}
{{% /tab %}}
{{% tab "Podman (experimental)" %}}
{{% readfile file="/docs/Reference/Drivers/includes/podman_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/podman_usage.inc" %}}
{{% /tab %}}
{{% /tabs %}}
{{% readfile file="/docs/Start/includes/post_install.inc" %}}
{{% readfile file="/docs/Handbook/Installation/includes/post_install.inc" %}}

View File

@ -51,24 +51,24 @@ brew upgrade minikube
{{% tabs %}}
{{% tab "Docker" %}}
{{% readfile file="/docs/Reference/Drivers/includes/docker_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/docker_usage.inc" %}}
{{% /tab %}}
{{% tab "Hyperkit" %}}
{{% readfile file="/docs/Reference/Drivers/includes/hyperkit_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/hyperkit_usage.inc" %}}
{{% /tab %}}
{{% tab "VirtualBox" %}}
{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/virtualbox_usage.inc" %}}
{{% /tab %}}
{{% tab "Parallels" %}}
{{% readfile file="/docs/Reference/Drivers/includes/parallels_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/parallels_usage.inc" %}}
{{% /tab %}}
{{% tab "VMware" %}}
{{% readfile file="/docs/Reference/Drivers/includes/vmware_macos_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/vmware_macos_usage.inc" %}}
{{% /tab %}}
{{% tab "Podman (experimental)" %}}
{{% readfile file="/docs/Reference/Drivers/includes/podman_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/podman_usage.inc" %}}
{{% /tab %}}
{{% /tabs %}}
{{% readfile file="/docs/Start/includes/post_install.inc" %}}
{{% readfile file="/docs/Handbook/Installation/includes/post_install.inc" %}}

View File

@ -32,21 +32,21 @@ After it has installed, close the current CLI session and reopen it. minikube sh
{{% tabs %}}
{{% tab "Docker" %}}
{{% readfile file="/docs/Reference/Drivers/includes/docker_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/docker_usage.inc" %}}
{{% /tab %}}
{{% tab "Hyper-V" %}}
## Check Hypervisor
{{% readfile file="/docs/Reference/Drivers/includes/check_virtualization_windows.inc" %}}
{{% readfile file="/docs/Drivers/includes/check_virtualization_windows.inc" %}}
{{% readfile file="/docs/Reference/Drivers/includes/hyperv_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/hyperv_usage.inc" %}}
{{% /tab %}}
{{% tab "VirtualBox" %}}
## Check Hypervisor
{{% readfile file="/docs/Reference/Drivers/includes/check_virtualization_windows.inc" %}}
{{% readfile file="/docs/Drivers/includes/check_virtualization_windows.inc" %}}
{{% readfile file="/docs/Reference/Drivers/includes/virtualbox_usage.inc" %}}
{{% readfile file="/docs/Drivers/includes/virtualbox_usage.inc" %}}
{{% /tab %}}
{{% /tabs %}}
{{% readfile file="/docs/Start/includes/post_install.inc" %}}
{{% readfile file="/docs/Handbook/Installation/includes/post_install.inc" %}}

View File

@ -0,0 +1,6 @@
---
title: "Handbook"
weight: 1
description: >
How to perform common tasks with minikube
---

View File

@ -1,7 +1,7 @@
---
title: "Accessing host resources"
title: "Host access"
date: 2017-01-05
weight: 2
weight: 10
description: >
How to access host resources from a pod
---

View File

@ -1,13 +1,44 @@
---
title: "LoadBalancer access"
linkTitle: "LoadBalancer access"
weight: 6
date: 2018-08-02
title: "Accessing apps"
weight: 3
description: >
How to access a LoadBalancer service in minikube
How to access applications running within minikube
---
## Overview
There are two major categories of services in Kubernetes:
* NodePort
* LoadBalancer
minikube supports either. Read on!
## NodePort access
A NodePort service is the most basic way to get external traffic directly to your service. NodePort, as the name implies, opens a specific port, and any traffic that is sent to this port is forwarded to the service.
### Getting the NodePort using the service command
We also have a shortcut for fetching the minikube IP and a service's `NodePort`:
`minikube service --url $SERVICE`
## Getting the NodePort using kubectl
The minikube VM is exposed to the host system via a host-only IP address, that can be obtained with the `minikube ip` command. Any services of type `NodePort` can be accessed over that IP address, on the NodePort.
To determine the NodePort for your service, you can use a `kubectl` command like this (note that `nodePort` begins with lowercase `n` in JSON output):
`kubectl get service $SERVICE --output='jsonpath="{.spec.ports[0].nodePort}"'`
### Increasing the NodePort range
By default, minikube only exposes ports 30000-32767. If this does not work for you, you can adjust the range by using:
`minikube start --extra-config=apiserver.service-node-port-range=1-65535`
This flag also accepts a comma separated list of ports and port ranges.
## LoadBalancer access
A LoadBalancer service is the standard way to expose a service to the internet. With this method, each service gets its own IP address.

View File

@ -0,0 +1,132 @@
---
title: "Configuration & Tuning"
weight: 4
description: >
Configuring your cluster
---
## Basic Configuration
Most minikube configuration is done via the flags interface. To see which flags are possible for the start command, run:
```shell
minikube start --help
```
## 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
```
For example, to persistently configure minikube to use hyperkit:
```shell
minikube config set driver hyperkit
```
## Kubernetes configuration
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
By default, minikube installs the latest stable version of Kubernetes that was available at the time of the minikube release. You may select a different Kubernetes release by using the `--kubernetes-version` flag, for example:
`minikube start --kubernetes-version=v1.11.10`
If you omit this flag, minikube will upgrade your cluster to the default version. If you would like to pin to a specific Kubernetes version across clusters, restarts, and upgrades to minikube, use:
`minikube config set kubernetes-version v1.11.0`
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 aims for the last 6 minor releases so that users can emulate legacy environments.
As of September 2019, this means that minikube supports and actively tests against the latest builds of:
* v1.16 (default)
* v1.15
* v1.14
* v1.13
* v1.12
* v1.11 (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
```
## Runtime configuration
The default container runtime in minikube is Docker. You can select it explicitly by using:
```shell
minikube start --container-runtime=docker
```
You can also select:
* *[containerd](https://github.com/containerd/containerd):
* `cri-o`: [CRI-O](https://github.com/kubernetes-sigs/cri-o):
## Command-line behaviors
minikube supports passing environment variables instead of flags for every value listed in `minikube config`. 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
### Example: Disabling emoji
```shell
export MINIKUBE_IN_STYLE=false
minikube start
```
### Making environment values persistent
To make the exported variables persistent across reboots:
* 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)

View File

@ -1,9 +1,8 @@
---
title: "Examples"
linkTitle: "Examples"
weight: 3
date: 2017-01-05
title: "Basic controls"
linkTitle: "Basic controls"
weight: 1
description: >
See minikube in action!
---

View File

@ -1,9 +1,8 @@
---
title: "Dashboard"
date: 2019-07-31
weight: 1
weight: 3
description: >
Using the Kubernetes Dashboard
Dashboard
---
minikube has integrated support for the [Kubernetes Dashboard UI](https://github.com/kubernetes/dashboard).
@ -46,4 +45,4 @@ minikube dashboard --url
## Reference
For additional information, see [the official Dashboard documentation](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/).
For additional information, see [the official Dashboard documentation](https://kubernetes.io/docs/Handbook/access-application-cluster/web-ui-dashboard/).

View File

@ -0,0 +1,47 @@
---
title: "Deploying apps"
linkTitle: "Deploying apps"
weight: 2
description: >
How to deploy an application to minikube
---
## kubectl
```
kubectl create deployment hello-minikube1 --image=k8s.gcr.io/echoserver:1.4
kubectl expose deployment hello-minikube1 --type=LoadBalancer --port=8080
```
## Addons
minikube has a built-in list of applications and services that may be easily deployed, such as Istio or Ingress. To list the available addons for your version of minikube:
```shell
minikube addons list
```
To enable an add-on, see:
```shell
minikube addons enable <name>
```
To enable an addon at start-up:
```shell
minikube start --addons <name>
```
For addons that expose a browser endpoint, you can quickly open them with:
```shell
minikube addons open <name>
```
To disable an addon:
```shell
minikube addons disable <name>
```

View File

@ -1,7 +1,7 @@
---
title: "File Sync"
linkTitle: "File Sync"
weight: 6
weight: 15
date: 2019-08-01
description: >
How to sync files into minikube

View File

@ -1,7 +1,6 @@
---
title: "Filesystem mounts"
title: "Mounting filesystems"
date: 2017-01-05
weight: 4
description: >
How to mount a host directory into the VM
---
@ -78,4 +77,4 @@ These mounts can be disabled by passing `--disable-driver-mounts` to `minikube s
## File Sync
See [File Sync]({{<ref "sync.md" >}})
See [File Sync]({{<ref "filesync.md" >}})

View File

@ -1,7 +1,7 @@
---
title: "Disk cache"
linkTitle: "Disk cache"
weight: 6
title: "Offline usage"
linkTitle: "Offline usage"
weight: 8
date: 2019-08-01
description: >
Cache Rules Everything Around minikube
@ -16,12 +16,10 @@ minikube has built-in support for caching downloaded resources into `$MINIKUBE_H
## Kubernetes image cache
NOTE: the `none` driver caches images directly into Docker rather than a separate disk cache.
`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.
## Arbitrary docker image cache
See [Tasks: Caching images]({{< ref "/docs/tasks/caching.md" >}})
## 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:

View File

@ -1,7 +1,7 @@
---
title: "Persistent Volumes"
linkTitle: "Persistent Volumes"
weight: 6
weight: 12
date: 2019-08-01
description: >
About persistent volumes (hostPath)

View File

@ -0,0 +1,116 @@
---
title: "Pushing images"
date: 2019-08-05
weight: 4
description: >
There are many ways to push images into minikube.
---
## Cached Images
From the host, you can push a Docker image directly to minikube. It will also be cached for future cluster starts.
```shell
minikube cache add ubuntu:16.04
```
The add command will store the requested image to `$MINIKUBE_HOME/cache/images`, and load it into the VM's container runtime environment next time `minikube start` is called.
To display images you have added to the cache:
```shell
minikube cache list
```
This listing will not include the images which are built-in to minikube.
```shell
minikube cache delete <image name>
```
For more information, see:
* [Reference: cache command]({{< ref "/docs/Commands/cache.md" >}})
You must be using minikube with the container runtime set to Docker. This is the default setting.
## Pushing directly to the in-cluster Docker daemon
When using a single VM of Kubernetes it's really handy to reuse the Docker daemon inside the VM; as this means you don't have to build on your host machine and push the image into a docker registry - you can just build inside the same docker daemon as minikube which speeds up local experiments.
To be able to work with the docker daemon on your mac/linux host use the docker-env command in your shell:
```shell
eval $(minikube docker-env)
```
You should now be able to use docker on the command line on your host mac/linux machine talking to the docker daemon inside the minikube VM:
```shell
docker ps
```
Remember to turn off the `imagePullPolicy:Always` (use `imagePullPolicy:IfNotPresent` or `imagePullPolicy:Never`), as otherwise Kubernetes won't use images you built locally.
## Pushing directly to in-cluster CRIO
To push directly to CRIO, configure podman client on your mac/linux host using the podman-env command in your shell:
```shell
eval $(minikube podman-env)
```
You should now be able to use podman on the command line on your host mac/linux machine talking to the podman service inside the minikube VM:
```shell
podman-remote help
```
Remember to turn off the `imagePullPolicy:Always` (use `imagePullPolicy:IfNotPresent` or `imagePullPolicy:Never`), as otherwise Kubernetes won't use images you built locally.
## Pushing to an in-cluster Registry
For illustration purpose, we will assume that minikube VM has one of the ip from `192.168.39.0/24` subnet. If you have not overridden these subnets as per [networking guide](https://minikube.sigs.k8s.io/docs/reference/networking/), you can find out default subnet being used by minikube for a specific OS and driver combination [here](https://github.com/kubernetes/minikube/blob/dfd9b6b83d0ca2eeab55588a16032688bc26c348/pkg/minikube/cluster/cluster.go#L408) which is subject to change. Replace `192.168.39.0/24` with appropriate values for your environment wherever applicable.
Ensure that docker is configured to use `192.168.39.0/24` as insecure registry. Refer [here](https://docs.docker.com/registry/insecure/) for instructions.
Ensure that `192.168.39.0/24` is enabled as insecure registry in minikube. Refer [here](https://minikube.sigs.k8s.io/docs/Handbook/registry/insecure/) for instructions..
Enable minikube registry addon:
```shell
minikube addons enable registry
```
Build docker image and tag it appropriately:
```shell
docker build --tag $(minikube ip):5000/test-img .
```
Push docker image to minikube registry:
```shell
docker push $(minikube ip):5000/test-img
```
## Building images inside of minikube
Use `minikube ssh` to connect to the virtual machine, and run the `docker build` there:
```shell
docker build
```
For more information on the `docker build` command, read the [Docker documentation](https://docs.docker.com/engine/reference/commandline/build/) (docker.com).
For Podman, use:
```shell
sudo -E podman build
```
For more information on the `podman build` command, read the [Podman documentation](https://github.com/containers/libpod/blob/master/docs/source/markdown/podman-build.1.md) (podman.io).

View File

@ -1,12 +1,36 @@
---
title: "Insecure"
linkTitle: "Insecure"
title: "Registries"
linkTitle: "Registries"
weight: 6
date: 2019-08-1
date: 2017-01-05
description: >
How to enable insecure registry support within minikube
How to interact with Docker registries.
---
## Using a Private Registry
**GCR/ECR/ACR/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), Azure Container Registry (ACR), 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
Do you want to enable Azure Container 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/Handbook/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`.
## Enabling Insecure Registries
minikube allows users to configure the docker engine's `--insecure-registry` flag.
You can use the `--insecure-registry` flag on the
@ -78,3 +102,5 @@ docker push localhost:5000/myimage
```
After the image is pushed, refer to it by `localhost:5000/{name}` in kubectl specs.
##

View File

@ -1,10 +1,10 @@
---
title: "Debugging"
linkTitle: "Debugging"
weight: 9
title: "Troubleshooting"
linkTitle: "Troubleshoot"
weight: 20
date: 2019-08-01
description: >
How to debug issues within minikube
How to troubleshoot minikube issues
---
## Enabling debug logs

View File

@ -1,13 +1,15 @@
---
title: "HTTP Proxies"
linkTitle: "HTTP Proxies"
title: "Proxies & VPN's"
weight: 6
date: 2017-01-05
description: >
How to use an HTTP/HTTPS proxy with minikube
How to use minikube with a VPN or HTTP/HTTPS Proxy
---
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:
minikube requires access to the internet via HTTP, HTTPS, and DNS protocols.
## Proxy
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
@ -47,20 +49,9 @@ 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
### Troubleshooting
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
#### unable to cache ISO... connection refused
```text
Unable to start VM: unable to cache ISO: https://storage.googleapis.com/minikube/iso/minikube.iso:
@ -72,7 +63,7 @@ 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
#### Unable to pull images..Client.Timeout exceeded while awaiting headers
```text
Unable to pull images, which may be OK:
@ -84,7 +75,7 @@ Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connect
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
#### x509: certificate signed by unknown authority
```text
[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.13.3:
@ -100,10 +91,23 @@ Ask your IT department for the appropriate PEM file, and add it to:
Then run `minikube delete` and `minikube start`.
## downloading binaries: proxyconnect tcp: tls: oversized record received with length 20527
#### 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
## VPN
* [Configure Docker to use a proxy server](https://docs.docker.com/network/proxy/)
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

View File

@ -1,50 +0,0 @@
---
title: "Overview"
linkTitle: "Overview"
weight: 1
description: >
What is it?
---
minikube implements a local Kubernetes cluster on macOS, Linux, and Windows.
minikube's [primary goals](https://minikube.sigs.k8s.io/docs/concepts/principles/) are to be the best tool for local Kubernetes application development and to support all Kubernetes features that fit.
minikube runs the latest stable release of Kubernetes, with support for standard Kubernetes features like:
* [LoadBalancer](https://minikube.sigs.k8s.io/docs/tasks/loadbalancer/) - using `minikube tunnel`
* Multi-cluster - using `minikube start -p <name>`
* NodePorts - using `minikube service`
* [Persistent Volumes](https://minikube.sigs.k8s.io/docs/reference/persistent_volumes/)
* Ingress
* RBAC
* [Dashboard](https://minikube.sigs.k8s.io/docs/tasks/dashboard/) - `minikube dashboard`
* [Container runtimes](https://minikube.sigs.k8s.io/docs/reference/runtimes/) - `start --container-runtime`
* [Configure apiserver and kubelet options](https://minikube.sigs.k8s.io/docs/reference/configuration/kubernetes/) via command-line flags
As well as developer-friendly features:
* [Addons](https://minikube.sigs.k8s.io/docs/tasks/addons/) - a marketplace for developers to share configurations for running services on minikube
* [GPU support](https://minikube.sigs.k8s.io/docs/tutorials/nvidia_gpu/) - for machine learning
* [Filesystem mounts](https://minikube.sigs.k8s.io/docs/tasks/mount/)
* Automatic failure analysis
## Why do I want it?
If you would like to develop Kubernetes applications:
* locally
* offline
* using the latest version of Kubernetes
Then minikube is for you.
* **What is it good for?** Developing local Kubernetes applications
* **What is it not good for?** Production Kubernetes deployments
## Where should I go next?
* [Getting Started](/docs/start/): Get started with minikube
* [Examples](/docs/examples/): Check out some minikube examples!
📣😀 **Please fill out our [fast 5-question survey](https://forms.gle/Gg3hG5ZySw8c1C24A)** so that we can learn how & why you use minikube, and what improvements we should make. Thank you! 💃🏽🎉

View File

@ -1,8 +0,0 @@
---
title: "Configuration"
linkTitle: "Configuration"
weight: 1
date: 2019-08-01
description: >
minikube configuration reference
---

View File

@ -1,57 +0,0 @@
---
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
By default, minikube installs the latest stable version of Kubernetes that was available at the time of the minikube release. You may select a different Kubernetes release by using the `--kubernetes-version` flag, for example:
`minikube start --kubernetes-version=v1.11.10`
If you omit this flag, minikube will upgrade your cluster to the default version. If you would like to pin to a specific Kubernetes version across clusters, restarts, and upgrades to minikube, use:
`minikube config set kubernetes-version v1.11.0`
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 aims for the last 6 minor releases so that users can emulate legacy environments.
As of September 2019, this means that minikube supports and actively tests against the latest builds of:
* v1.16 (default)
* v1.15
* v1.14
* v1.13
* v1.12
* v1.11 (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
```

View File

@ -1,164 +0,0 @@
---
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:
* 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
* 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
- driver: vmware
- dashboard: true
- gvisor: true
```
### Setting a new property override
```shell
minikube config set <key> <value>
```
For example:
```shell
minikube config set driver hyperkit
```
## Environment Configuration
### Config variables
minikube supports passing environment variables instead of flags for every value listed in `minikube config`. 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
```

View File

@ -1,10 +0,0 @@
---
title: "Networking"
linkTitle: "Networking"
weight: 6
date: 2018-08-01
description: >
How minikube interacts with networks.
---
Since minikube runs everything from within a VM, networking can get fairly complicated.

View File

@ -1,58 +0,0 @@
---
title: "DNS Domain"
linkTitle: "DNS Domain"
weight: 6
date: 2019-10-09
description: >
Use configured DNS domain in bootstrapper kubeadm
---
minikube by default uses **cluster.local** if none is specified via the start flag --dns-domain. The configuration file used by kubeadm are found inside **/var/tmp/minikube/kubeadm.yaml** directory inside minikube.
Default DNS configuration will look like below
```
apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
localAPIEndpoint:
......
......
---
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
.....
.....
kubernetesVersion: v1.16.0
networking:
dnsDomain: cluster.local
podSubnet: ""
serviceSubnet: 10.96.0.0/12
---
```
To change the dns pass the value when starting minikube
```
minikube start --dns-domain bla.blah.blah
```
the dns now changed to bla.blah.blah
```
apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
localAPIEndpoint:
......
......
---
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
.....
.....
kubernetesVersion: v1.16.0
networking:
dnsDomain: bla.blah.blah
podSubnet: ""
serviceSubnet: 10.96.0.0/12
---
```

View File

@ -1,23 +0,0 @@
---
title: "Host VPN"
linkTitle: "Host VPN"
weight: 6
date: 2019-08-01
description: >
Using minikube on a host with a VPN installed
---
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

View File

@ -1,8 +0,0 @@
---
title: "Reference"
linkTitle: "Reference"
weight: 5
description: >
Low level reference docs
---

View File

@ -1,44 +0,0 @@
---
title: "Environment Variables"
linkTitle: "Environment Variables"
weight: 6
date: 2019-08-01
---
## Config option variables
minikube supports passing environment variables instead of flags for every value listed in `minikube config`. 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
## Example: Disabling emoji
```shell
export MINIKUBE_IN_STYLE=false
minikube start
```
## Making values persistent
To make the exported variables persistent across reboots:
* 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)

View File

@ -1,47 +0,0 @@
---
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).

View File

@ -1,7 +0,0 @@
---
title: "Getting Started"
linkTitle: "Getting Started"
weight: 2
description: >
How to install and start minikube.
---

View File

@ -1,8 +0,0 @@
---
title: "Working with Registries"
linkTitle: "Working with Registries"
weight: 6
date: 2017-01-05
description: >
How to interact with Docker registries.
---

View File

@ -1,30 +0,0 @@
---
title: "Private"
linkTitle: "Private"
weight: 6
date: 2020-01-14
description: >
How to use a private registry within minikube
---
**GCR/ECR/ACR/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), Azure Container Registry (ACR), 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
Do you want to enable Azure Container 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`.

View File

@ -1,15 +0,0 @@
---
title: "Core Tasks"
linkTitle: "Core Tasks"
weight: 4
date: 2017-01-05
description: >
What can you do with minikube?
---
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....").
* What this task accomplishes.
* Instructions for the task. If it involves editing a file, running a command, or writing code, provide code-formatted example snippets to show the user what to do! If there are multiple steps, provide them as a numbered list.
* If appropriate, links to related concept, tutorial, or example pages.

View File

@ -1,81 +0,0 @@
---
title: "Addons"
date: 2019-07-31
weight: 4
description: >
Using addons
---
minikube has a set of built-in addons that, when enabled, can be used within Kubernetes.
## Available addons
* [Kubernetes Dashboard](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dashboard)
* [EFK](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch)
* [Registry](https://github.com/kubernetes/minikube/tree/master/deploy/addons/registry)
* [Registry Credentials](https://github.com/upmc-enterprises/registry-creds)
* [Ingress](https://github.com/kubernetes/ingress-nginx)
* [Freshpod](https://github.com/GoogleCloudPlatform/freshpod)
* [nvidia-driver-installer](https://github.com/GoogleCloudPlatform/container-engine-accelerators/tree/master/nvidia-driver-installer/minikube)
* [nvidia-gpu-device-plugin](https://github.com/GoogleCloudPlatform/container-engine-accelerators/tree/master/cmd/nvidia_gpu)
* [logviewer](https://github.com/ivans3/minikube-log-viewer)
* [gvisor](../../../gvisor/readme/)
* [storage-provisioner-gluster](../../../storage-provisioner-gluster/readme)
* [helm-tiller](../../../helm-tiller/readme)
* [ingress-dns](../../../ingress-dns/readme)
* [istio](../../../istio/readme)
## Listing available addons
```shell
minikube addons list
```
Example output:
```
- registry: disabled
- registry-creds: disabled
- freshpod: disabled
- addon-manager: enabled
- dashboard: enabled
- efk: disabled
- ingress: disabled
- istio: disabled
- istio-provisioner: enabled
- default-storageclass: enabled
- storage-provisioner: enabled
- storage-provisioner-gluster: disabled
- nvidia-driver-installer: disabled
- nvidia-gpu-device-plugin: disabled
```
## Enabling an addon
```shell
minikube addons enable <name>
```
or
```shell
minikube start --addons <name>
```
## Interacting with an addon
For addons that expose a browser endpoint, use:
```shell
minikube addons open <name>
```
## Disabling an addon
```shell
minikube addons disable <name>
```
## Custom Addons
If you would like to have minikube properly start/restart custom addons, place the addon(s) _.yaml_ you wish to be launched with minikube in the `.minikube/addons` directory. Addons in this folder will be moved to the minikube VM and launched each time minikube is started/restarted. Learn [how to develop minikube addons]({{< ref "/docs/contributing/addons.en.md" >}}).

View File

@ -1,37 +0,0 @@
---
title: "Building images within minikube"
date: 2019-08-05
weight: 1
description: >
Building images within minikube
---
When using a single VM of Kubernetes it's really handy to build inside the VM; as this means you don't have to build on your host machine and push the image into a docker registry - you can just build inside the same machine as minikube which speeds up local experiments.
## Docker (containerd)
For Docker, you can either set up your host docker client to communicate by [reusing the docker daemon]({{< ref "/docs/tasks/docker_daemon.md" >}}).
Or you can use `minikube ssh` to connect to the virtual machine, and run the `docker build` there:
```shell
docker build
```
For more information on the `docker build` command, read the [Docker documentation](https://docs.docker.com/engine/reference/commandline/build/) (docker.com).
## Podman (cri-o)
For Podman, you can either set up your host `podman-remote` client to communicate with Podman service within minikube, by [reusing the Podman service]({{< ref "/docs/tasks/podman_service" >}}).
Or you can use `minikube ssh`; you will also make sure to run the command as the root user:
```shell
sudo -E podman build
```
For more information on the `podman build` command, read the [Podman documentation](https://github.com/containers/libpod/blob/master/docs/source/markdown/podman-build.1.md) (podman.io).
## Build context
For the build context you can use any directory on the virtual machine, or any address on the network.

View File

@ -1,42 +0,0 @@
---
title: "Caching images"
date: 2019-08-05
weight: 1
description: >
How to cache arbitrary Docker images
---
## Overview
For offline use and performance reasons, minikube caches required Docker images onto the local file system. Developers may find it useful to add their own images to this cache for local development.
## Adding an image
To add the ubuntu 16.04 image to minikube's image cache:
```shell
minikube cache add ubuntu:16.04
```
The add command will store the requested image to `$MINIKUBE_HOME/cache/images`, and load it into the VM's container runtime environment next time `minikube start` is called.
## Listing images
To display images you have added to the cache:
```shell
minikube cache list
```
This listing will not include the images which are built-in to minikube.
## Deleting an image
```shell
minikube cache delete <image name>
```
### Additional Information
* [Reference: Disk Cache]({{< ref "/docs/reference/disk_cache.md" >}})
* [Reference: cache command]({{< ref "/docs/reference/commands/cache.md" >}})

View File

@ -1,79 +0,0 @@
---
title: "Using the Docker daemon"
linkTitle: "Using the Docker daemon"
weight: 6
date: 2018-08-02
description: >
How to access the Docker daemon within minikube
---
## Prerequisites
You must be using minikube with the container runtime set to Docker. This is the default setting.
## Method 1: Without minikube registry addon
When using a single VM of Kubernetes it's really handy to reuse the Docker daemon inside the VM; as this means you don't have to build on your host machine and push the image into a docker registry - you can just build inside the same docker daemon as minikube which speeds up local experiments.
To be able to work with the docker daemon on your mac/linux host use the docker-env command in your shell:
```shell
eval $(minikube docker-env)
```
You should now be able to use docker on the command line on your host mac/linux machine talking to the docker daemon inside the minikube VM:
```shell
docker ps
```
Remember to turn off the _imagePullPolicy:Always_, as otherwise Kubernetes won't use images you built locally.
### Possible errors and solutions
Docker may report following forbidden error if you are using http proxy and the `$(minikube ip)` is not added to `no_proxy`/`NO_PROXY`:
```
error during connect: Get https://192.168.39.98:2376/v1.39/containers/json: Forbidden
```
On Centos 7, docker may report the following error:
```
Could not read CA certificate "/etc/docker/ca.pem": open /etc/docker/ca.pem: no such file or directory
```
The fix is to update ``/etc/sysconfig/docker`` to ensure that minikube's environment changes are respected:
```diff
< DOCKER_CERT_PATH=/etc/docker
---
> if [ -z "${DOCKER_CERT_PATH}" ]; then
> DOCKER_CERT_PATH=/etc/docker
> fi
```
When you're using a docker installed via `snap` on a distribution like Ubuntu that uses AppArmor profiles the following error may appear:
```
could not read CA certificate "/home/USERNAME/.minikube/certs/ca.pem": open /home/USERNAME/.minikube/certs/ca.pem: permission denied
```
The solution is to allow docker to read the minikube certificates by adding a line in ``/var/lib/snapd/apparmor/profiles/snap.docker.docker`` file:
```shell
# allow docker to read minikube certificates
owner @{HOME}/.minikube/certs/* r,
```
After that check for syntax errors and try again:
```shell
sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.docker.docker
eval $(minikube docker-env)
docker ps
```
## Related Documentation
- [Using the Docker registry]({{< ref "/docs/tasks/docker_registry" >}})

View File

@ -1,48 +0,0 @@
---
title: "Using the Docker registry"
linkTitle: "Using the Docker registry"
weight: 6
date: 2018-08-02
description: >
How to access the Docker registry within minikube
---
As an alternative to [reusing the Docker daemon]({{< ref "/docs/tasks/docker_daemon.md" >}}), you may enable the registry addon to push images directly into registry.
Steps are as follows:
For illustration purpose, we will assume that minikube VM has one of the ip from `192.168.39.0/24` subnet. If you have not overridden these subnets as per [networking guide](https://minikube.sigs.k8s.io/docs/reference/networking/), you can find out default subnet being used by minikube for a specific OS and driver combination [here](https://github.com/kubernetes/minikube/blob/dfd9b6b83d0ca2eeab55588a16032688bc26c348/pkg/minikube/cluster/cluster.go#L408) which is subject to change. Replace `192.168.39.0/24` with appropriate values for your environment wherever applicable.
Ensure that docker is configured to use `192.168.39.0/24` as insecure registry. Refer [here](https://docs.docker.com/registry/insecure/) for instructions.
Ensure that `192.168.39.0/24` is enabled as insecure registry in minikube. Refer [here](https://minikube.sigs.k8s.io/docs/tasks/registry/insecure/) for instructions..
Enable minikube registry addon:
```shell
minikube addons enable registry
```
Build docker image and tag it appropriately:
```shell
docker build --tag $(minikube ip):5000/test-img .
```
Push docker image to minikube registry:
```shell
docker push $(minikube ip):5000/test-img
```
Now run it in minikube:
```shell
kubectl run test-img --image=$(minikube ip):5000/test-img
```
Or if `192.168.39.0/24` is not enabled as insecure registry in minikube, then:
```shell
kubectl run test-img --image=localhost:5000/test-img
```

View File

@ -1,33 +0,0 @@
---
title: "NodePort access"
linkTitle: "NodePort access"
weight: 6
date: 2018-08-02
description: >
How to access a NodePort service in minikube
---
A NodePort service is the most basic way to get external traffic directly to your service. NodePort, as the name implies, opens a specific port, and any traffic that is sent to this port is forwarded to the service.
### Getting the NodePort using the service command
We also have a shortcut for fetching the minikube IP and a service's `NodePort`:
`minikube service --url $SERVICE`
## Getting the NodePort using kubectl
The minikube VM is exposed to the host system via a host-only IP address, that can be obtained with the `minikube ip` command. Any services of type `NodePort` can be accessed over that IP address, on the NodePort.
To determine the NodePort for your service, you can use a `kubectl` command like this (note that `nodePort` begins with lowercase `n` in JSON output):
`kubectl get service $SERVICE --output='jsonpath="{.spec.ports[0].nodePort}"'`
### Increasing the NodePort range
By default, minikube only exposes ports 30000-32767. If this does not work for you, you can adjust the range by using:
`minikube start --extra-config=apiserver.service-node-port-range=1-65535`
This flag also accepts a comma separated list of ports and port ranges.

View File

@ -1,58 +0,0 @@
---
title: "Using the Podman service"
linkTitle: "Using the Podman service"
weight: 6
date: 2020-01-20
description: >
How to access the Podman service within minikube
---
## Prerequisites
You should be using minikube with the container runtime set to CRI-O. It uses the same storage as Podman.
## Method 1: Without minikube registry addon
When using a single VM of Kubernetes it's really handy to reuse the Podman service inside the VM; as this means you don't have to build on your host machine and push the image into a container registry - you can just build inside the same container storage as minikube which speeds up local experiments.
To be able to work with the podman client on your mac/linux host use the podman-env command in your shell:
```shell
eval $(minikube podman-env)
```
You should now be able to use podman on the command line on your host mac/linux machine talking to the podman service inside the minikube VM:
```shell
podman-remote help
```
Remember to turn off the `imagePullPolicy:Always` (use `imagePullPolicy:IfNotPresent` or `imagePullPolicy:Never`), as otherwise Kubernetes won't use images you built locally.
### Example
```shell
$ cat Containerfile
FROM busybox
CMD exec /bin/sh -c "trap : TERM INT; (while true; do sleep 1000; done) & wait"
$ eval $(minikube podman-env)
$ podman-remote build -t example.com/test:v1 .
STEP 1: FROM busybox
STEP 2: CMD exec /bin/sh -c "trap : TERM INT; (while true; do sleep 1000; done) & wait"
STEP 3: COMMIT example.com/test:v1
2881381f7b9675ea5a0e635605bc0c4c08857582990bcadf0685b9f8976de2d3
$ minikube ssh -- sudo crictl images example.com/test:v1
IMAGE TAG IMAGE ID SIZE
example.com/test v1 2881381f7b967 1.44MB
$ kubectl run test --image example.com/test:v1 --image-pull-policy=IfNotPresent
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
deployment.apps/test created
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
test-d98bdbfdd-lwnqz 1/1 Running 0 18s
```
## Related Documentation
- [Using the Docker registry]({{< ref "/docs/tasks/docker_registry" >}})

View File

@ -1,7 +1,6 @@
---
title: "Tutorials"
linkTitle: "Tutorials"
weight: 4
weight: 9
date: 2017-01-04
description: >
Contributed end-to-end tutorials using minikube

View File

@ -9,8 +9,8 @@ description: >
## Overview
[Auditing](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/) is not enabled in minikube by default.
This tutorial shows how to provide an [Audit Policy](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-policy) file to the minikube API server on startup.
[Auditing](https://kubernetes.io/docs/Handbook/debug-application-cluster/audit/) is not enabled in minikube by default.
This tutorial shows how to provide an [Audit Policy](https://kubernetes.io/docs/Handbook/debug-application-cluster/audit/#audit-policy) file to the minikube API server on startup.
## Tutorial
@ -34,6 +34,6 @@ minikube start \
kubectl logs kube-apiserver-minikube -n kube-system | grep audit.k8s.io/v1
```
The [Audit Policy](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-policy) used in this tutorial is very minimal and quite verbose. As a next step you might want to finetune the `audit-policy.yaml` file. To get the changes applied you need to stop and start minikube. Restarting minikube triggers the [file sync mechanism](https://minikube.sigs.k8s.io/docs/tasks/sync/) that copies the yaml file onto the minikube node and causes the API server to read the changed policy file.
The [Audit Policy](https://kubernetes.io/docs/Handbook/debug-application-cluster/audit/#audit-policy) used in this tutorial is very minimal and quite verbose. As a next step you might want to finetune the `audit-policy.yaml` file. To get the changes applied you need to stop and start minikube. Restarting minikube triggers the [file sync mechanism](https://minikube.sigs.k8s.io/docs/Handbook/sync/) that copies the yaml file onto the minikube node and causes the API server to read the changed policy file.
Note: Currently there is no dedicated directory to store the `audit-policy.yaml` file in `~/.minikube/`. Using the `~/.minikube/files/etc/ssl/certs` directory is a workaround! This workaround works like this: By putting the file into a sub-directory of `~/.minikube/files/`, the [file sync mechanism](https://minikube.sigs.k8s.io/docs/tasks/sync/) gets triggered and copies the `audit-policy.yaml` file from the host onto the minikube node. When the API server container gets started by `kubeadm` I'll mount the `/etc/ssl/certs` directory from the minikube node into the container. This is the reason why the `audit-policy.yaml` file has to be stored in the ssl certs directory: It's one of the directories that get mounted from the minikube node into the container.
Note: Currently there is no dedicated directory to store the `audit-policy.yaml` file in `~/.minikube/`. Using the `~/.minikube/files/etc/ssl/certs` directory is a workaround! This workaround works like this: By putting the file into a sub-directory of `~/.minikube/files/`, the [file sync mechanism](https://minikube.sigs.k8s.io/docs/Handbook/sync/) gets triggered and copies the `audit-policy.yaml` file from the host onto the minikube node. When the API server container gets started by `kubeadm` I'll mount the `/etc/ssl/certs` directory from the minikube node into the container. This is the reason why the `audit-policy.yaml` file has to be stored in the ssl certs directory: It's one of the directories that get mounted from the minikube node into the container.

View File

@ -9,7 +9,7 @@ description: >
## Overview
Most continuous integration environments are already running inside a VM, and may not support nested virtualization. The `none` driver was designed for this use case. or you could alternatively use the [Docker](https://minikube.sigs.k8s.io/docs/reference/drivers/docker).
Most continuous integration environments are already running inside a VM, and may not support nested virtualization. The `none` driver was designed for this use case. or you could alternatively use the [Docker](https://minikube.sigs.k8s.io/docs/Drivers/docker).
## Prerequisites
@ -42,4 +42,4 @@ sudo -E minikube start --driver=none
## Alternative ways
you could alternatively use minikube's container drivers such as [Docker](https://minikube.sigs.k8s.io/docs/reference/drivers/docker) or [Podman](https://minikube.sigs.k8s.io/docs/reference/drivers/podman).
you could alternatively use minikube's container drivers such as [Docker](https://minikube.sigs.k8s.io/docs/Drivers/docker) or [Podman](https://minikube.sigs.k8s.io/docs/Drivers/podman).

Some files were not shown because too many files have changed in this diff Show More