Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Priya Wadhwa committed Oct 29, 2019
1 parent c41eb8a commit bd5840a
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 78 deletions.
3 changes: 0 additions & 3 deletions cmd/minikube/cmd/generate-docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ var generateDocs = &cobra.Command{
Example: "minikube generate-docs --path <FOLDER_PATH>",
Hidden: true,
Run: func(cmd *cobra.Command, args []string) {
if path == "" {
exit.UsageT("Please specify a directory to write docs to via the --path flag.")
}

// if directory does not exist
docsPath, err := os.Stat(path)
Expand Down
9 changes: 6 additions & 3 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,7 @@ func (k *Bootstrapper) client(k8s config.KubernetesConfig) (*kubernetes.Clientse
return kubernetes.NewForConfig(config)
}

// WaitForPods blocks until Kubernetes appears to be healthy.
// if waitForPods is nil, then wait for everything. Otherwise, only
// wait for pods specified.
// WaitForPods blocks until pods specified in podsToWaitFor appear to be healthy.
func (k *Bootstrapper) WaitForPods(k8s config.KubernetesConfig, timeout time.Duration, podsToWaitFor []string) error {
// Do not wait for "k8s-app" pods in the case of CNI, as they are managed
// by a CNI plugin which is usually started after minikube has been brought
Expand Down Expand Up @@ -411,6 +409,11 @@ func (k *Bootstrapper) WaitForPods(k8s config.KubernetesConfig, timeout time.Dur
return nil
}

// shouldWaitForPod returns true if:
// 1. podsToWaitFor is nil
// 2. name is in podsToWaitFor
// 3. ALL_PODS is in podsToWaitFor
// else, return false
func shouldWaitForPod(name string, podsToWaitFor []string) bool {
if podsToWaitFor == nil {
return true
Expand Down
125 changes: 53 additions & 72 deletions site/content/en/docs/Reference/Commands/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,78 +16,59 @@ minikube start [flags]
### Options

```
--addons=[]: Enable addons. see `minikube addons list` for a list of valid addon names.
--apiserver-ips=[]: 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
--apiserver-name='minikubeCA': 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
--apiserver-names=[]: 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=8443: The apiserver listening port
--auto-update-drivers=true: If set, automatically updates drivers to the latest version. Defaults to true.
--cache-images=true: If true, cache docker images for the current bootstrapper and load them into the machine.
Always false with --vm-driver=none.
--container-runtime='docker': The container runtime to be used (docker, crio, containerd).
--cpus=2: Number of CPUs allocated to the minikube VM.
--cri-socket='': The cri socket path to be used.
--disable-driver-mounts=false: Disables the filesystem mounts provided by the hypervisors
--disk-size='20000mb': Disk size allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or
g).
--dns-domain='cluster.local': The cluster dns domain name used in the kubernetes cluster
--dns-proxy=false: Enable proxy for NAT DNS requests (virtualbox driver only)
--docker-env=[]: Environment variables to pass to the Docker daemon. (format: key=value)
--docker-opt=[]: Specify arbitrary flags to pass to the Docker daemon. (format: key=value)
--download-only=false: If true, only download and cache files for later use - don't install or start anything.
--embed-certs=false: if true, will embed the certs in kubeconfig.
--enable-default-cni=false: Enable the default CNI plugin (/etc/cni/net.d/k8s.conf). Used in conjunction with
"--network-plugin=cni".
--extra-config=: 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='': A set of key=value pairs that describe feature gates for alpha/experimental features.
--force=false: Force minikube to perform possibly dangerous operations
--host-dns-resolver=true: Enable host resolver for NAT DNS requests (virtualbox driver only)
--host-only-cidr='192.168.99.1/24': The CIDR to be used for the minikube VM (virtualbox driver only)
--hyperkit-vpnkit-sock='': 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 driver only)
--hyperkit-vsock-ports=[]: List of guest VSock ports that should be exposed as sockets on the host (hyperkit
driver only)
--hyperv-virtual-switch='': The hyperv virtual switch name. Defaults to first found. (hyperv driver only)
--image-mirror-country='': 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='': 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=[]: Insecure Docker registries to pass to the Docker daemon. The default service CIDR range
will automatically be added.
--interactive=true: Allow user prompts for more information
--iso-url='https://storage.googleapis.com/minikube/iso/minikube-v1.5.0.iso': Location of the minikube iso.
--keep-context=false: This will keep the existing kubectl context and will create a minikube context.
--kubernetes-version='v1.16.2': The kubernetes version that the minikube VM will use (ex: v1.2.3)
--kvm-gpu=false: Enable experimental NVIDIA GPU support in minikube
--kvm-hidden=false: Hide the hypervisor signature from the guest in minikube (kvm2 driver only)
--kvm-network='default': The KVM network name. (kvm2 driver only)
--kvm-qemu-uri='qemu:///system': The KVM QEMU connection URI. (kvm2 driver only)
--memory='2000mb': Amount of RAM allocated to the minikube VM (format: <number>[<unit>], where unit = b, k, m or
g).
--mount=false: This will start the mount daemon and automatically mount files into minikube.
--mount-string='/Users:/minikube-host': The argument to pass the minikube mount command on start.
--native-ssh=true: Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh'
command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for
SSH'.
--network-plugin='': The name of the network plugin.
--nfs-share=[]: Local folders to share with Guest via NFS mounts (hyperkit driver only)
--nfs-shares-root='/nfsshares': Where to root the NFS Shares, defaults to /nfsshares (hyperkit driver only)
--no-vtx-check=false: Disable checking for the availability of hardware virtualization before the vm is started
(virtualbox driver only)
--registry-mirror=[]: Registry mirrors to pass to the Docker daemon
--service-cluster-ip-range='10.96.0.0/12': The CIDR to be used for service cluster IPs.
--uuid='': Provide VM UUID to restore MAC address (hyperkit driver only)
--vm-driver='': Driver is one of: [virtualbox parallels vmwarefusion hyperkit vmware] (defaults to auto-detect)
--wait=false: Wait until Kubernetes core services are healthy before exiting.
--wait-timeout=6m0s: max time to wait per Kubernetes core services to be healthy.
--addons Enable addons. see `minikube addons list` for a list of valid addon names.
--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.
--disable-driver-mounts Disables the filesystem mounts provided by the hypervisors
--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.
--embed-certs if true, will embed the certs in kubeconfig.
--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.
--force Force minikube to perform possibly dangerous operations
-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.3.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.2")
--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)
--wait-timeout duration max time to wait per Kubernetes core services to be healthy. (default 3m0s)
```

### Options inherited from parent commands
Expand Down

0 comments on commit bd5840a

Please sign in to comment.