Commit Graph

2953 Commits (ae40c5762333781b6b1c2caa86369721cc451ad3)

Author SHA1 Message Date
Sharif Elgamal a0d4d429e4
Merge pull request #13174 from sharifelgamal/addon-cleanup
cleanup addons documentation and image sources
2021-12-15 14:43:37 -08:00
Sharif Elgamal 5de765023a
Merge pull request #13124 from sharifelgamal/kicbase-arch
fix kicbase dockerfile to allow ppc64le and armv7 archs
2021-12-15 14:08:07 -08:00
Sharif Elgamal aff01abcd1
Update cmd/minikube/cmd/config/addons_list_test.go
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
2021-12-15 13:36:21 -08:00
Sharif Elgamal cf73e08262 make the test better 2021-12-14 17:11:00 -08:00
Sharif Elgamal 066ee66ba8 fix unit test 2021-12-14 16:28:55 -08:00
Medya Ghazizadeh b924ca6155
Merge pull request #13147 from Ashwin901/master
Improve UI Advice for failing to start for non-installed drivers
2021-12-14 13:52:30 -08:00
Sharif Elgamal c3688b6230 address comments 2021-12-14 12:36:48 -08:00
Steven Powell 54c615bd36 remove --mode flag from mount 2021-12-13 15:32:20 -08:00
Sharif Elgamal 2d12be02c4 detect arm better 2021-12-13 14:35:16 -08:00
Sharif Elgamal 50ed250fce don't use crio on armv7 either 2021-12-13 13:31:04 -08:00
Ashwin901 daa270ec0c display installed and non-installed drivers in separate lists 2021-12-12 12:28:13 +05:30
Steven Powell 5ddb53f57b add all mount flags to start command 2021-12-10 11:43:50 -08:00
Steven Powell 9d16d24909
Revert "Refactored to remove config.ExtraOptions" 2021-12-08 13:07:33 -08:00
Steven Powell ed380db035
Merge pull request #13125 from spowelljr/refactorExtraOptions
Refactored to remove config.ExtraOptions
2021-12-08 09:48:53 -08:00
Steven Powell 3cd016b06f added comment and append error to message 2021-12-07 16:56:35 -08:00
Sharif Elgamal da7020aa9c format error message EVEN BETTER 2021-12-07 16:27:50 -08:00
Sharif Elgamal b9e9df130a return better error 2021-12-07 16:10:04 -08:00
Steven Powell 355f431c2d refactored to remove config.ExtraOptions 2021-12-07 16:09:39 -08:00
Sharif Elgamal 6b7168cf4b fix kicbase dockerfile to allow ppc64le and armv7 archs 2021-12-07 16:05:32 -08:00
Medya Ghazizadeh f915d68855
Merge pull request #13110 from medyagh/k8sgomod
gomod: remove depending on k8s.io/kubernetes as a lib
2021-12-07 16:04:23 -08:00
Medya Ghazizadeh c3ea9c298c
Merge pull request #12692 from arrikto/fix-apiserver-ips
Support changing apiserver-ips when restarting minikube
2021-12-07 15:33:24 -08:00
Medya Gh e900c5bb76 replacea all references to kuberentes/cmd to third_party 2021-12-07 14:20:07 -08:00
Sharif Elgamal 30afddc6c1
Merge pull request #13072 from klaases/kstop1
Stop K8s if running, when '--no-kubernetes' flag used
2021-12-06 12:49:20 -08:00
Medya Ghazizadeh f1d63dfcff
Merge pull request #12990 from spowelljr/btrfsErrorMessage
Add advice if user using btrfs storage driver
2021-12-03 16:06:06 -08:00
klaases 47a280bdc7 Fix check for stopping k8s. 2021-12-03 14:15:00 -08:00
Sergio Galvan de3799696d
add support for uppercase
Signed-off-by: Sergio Galvan <sergalma@gmail.com>
2021-12-03 22:35:09 +01:00
Sergio Galvan 9348d6a4f0
support newest for --kubernetes-version 2021-12-03 21:48:11 +01:00
klaases f3186d07d8 Detect whether k8s needs to be stopped. 2021-12-03 12:35:34 -08:00
klaases e468a42e15
Merge branch 'master' into kstop1 2021-12-02 14:43:33 -08:00
klaases 3074132aeb Stop K8s if running, when --no-kubernetes. 2021-12-02 14:35:38 -08:00
Steven Powell c8fbd6e242 typo 2021-12-02 09:39:42 -08:00
Steven Powell 3f8e3dc3ed use oci cache to get storage driver 2021-12-01 16:15:01 -08:00
Steven Powell 592e2b01ca auto set LocalStorageCapacityIsolation for BTRFS 2021-11-30 14:34:57 -08:00
Piotr Resztak 7b3860388c Print a message about preserving kicbase image
Print additional info about preserving kicbase image and generates
image deletion command for user when running `minikube delete`.
Message is printed only when `--purge` option is used.
2021-11-25 23:36:59 +01:00
Steven Powell ee75b3c368 add support for port validation with ip 2021-11-23 10:09:14 -08:00
Medya Ghazizadeh 3686ba58f0
Merge pull request #11598 from daehyeok/copy_from
Support copy file from node to local host or between nodes.
2021-11-22 13:42:35 -08:00
Medya Ghazizadeh 119a0f07d7
Merge pull request #12942 from klaases/go5
Exit if --kubernetes-version and --no-kubernetes are specified.
2021-11-22 10:01:21 -08:00
klaases 22bbf5f9bb Add config unset message. 2021-11-19 13:54:57 -08:00
Medya Ghazizadeh 2ab68fb50f
Merge pull request #12977 from medyagh/allflag_cache
fix flag name in cache add
2021-11-18 08:19:29 -08:00
Medya Ghazizadeh 355fe0e2bc
Merge pull request #12976 from spowelljr/outputTunnelHasStarted
Output tunnel has started message so users aren't confused if tunnel is running
2021-11-17 16:05:18 -08:00
Medya Ghazizadeh 43482ee901
Merge pull request #12952 from spowelljr/privOnlyWSL
Only check privileged ports for WSL
2021-11-17 16:03:52 -08:00
Steven Powell 3dfe2a0af9 updated message 2021-11-17 15:43:19 -08:00
Steven Powell 0059bc953f
Merge pull request #12958 from klaases/go6
ensure --memory flag is within syslimit
2021-11-17 18:37:39 -05:00
Medya Gh 64ce5460cf fix flag name in cache add 2021-11-17 15:31:55 -08:00
Steven Powell c470b8db18 output tunnel has started message so users aren't confused if tunnel is running 2021-11-17 15:22:39 -08:00
Medya Ghazizadeh 48424c5393
Merge pull request #11909 from vishjain/user/vishal/memory-leak/master
Cleanup on ticker allocations.
2021-11-17 13:23:54 -06:00
Steven Powell 3c125f10e9
Merge pull request #12972 from mpuckett159/bug/fix-docker-env-typo
Fix typo in help text for minikube docker-env command
2021-11-17 13:51:52 -05:00
Marcus Puckett d831158c0c Fix typo in help text for minikube docker-env
In the help text for the `minikube docker-env` command the suggestions for setting the docker command for Windows (cmd and powershell) don't work as output because if you don't pass the `--shell` flag, it adds a line at the beginning that will cause the cmd example to fail, and doesn't specify that you need to set the flag `--shell powershell` for it to work properly. I've updated the help text to provide a command that will work as expected for both shells.
2021-11-16 22:48:55 -08:00
klaases 227efdd03a Exit if both no-kubernetes and kubernetes-version flags are used together. 2021-11-16 15:53:32 -08:00
klaases 38358b9b63 Return NoKubernetesVersion if noKubernetes is true. 2021-11-16 14:24:02 -08:00
klaases f3f5ae3474 Only check kubernetesVersion flag if noKubernetes is false. 2021-11-16 14:17:29 -08:00
Steven Powell 2a99b2f946 fix out of bound exceptions 2021-11-16 11:40:02 -05:00
klaases e22b8c0709 ensure --memory flag is within syslimit 2021-11-15 13:35:12 -08:00
Pablo Caderno 5594331882 fix: do not let users run --no-kubernetes on the none driver
Signed-off-by: Pablo Caderno <kaderno@gmail.com>
2021-11-16 07:06:37 +11:00
Steven Powell 518fd1d6fa update unit test 2021-11-15 12:16:57 -05:00
Steven Powell 81aedea0bd only check privileged ports for WSL 2021-11-15 11:49:59 -05:00
Medya Ghazizadeh 8bd28a6599
Merge pull request #12933 from klaases/go2
update suggestion messaging for --no-kubernetes
2021-11-12 12:21:14 -08:00
Medya Ghazizadeh 80b4e238cf
Merge pull request #12900 from AkihiroSuda/rootless-crio
Support CRI-O runtime with Rootless Docker driver (`--driver=docker --container-runtime=cri-o`)
2021-11-11 16:05:36 -08:00
klaases 532b383f46 Add "minikube image" message. 2021-11-11 14:53:31 -08:00
klaases 4238bc1319 update message by runtime 2021-11-11 14:49:18 -08:00
Medya Ghazizadeh 75e2466cf9
Merge pull request #12923 from sharifelgamal/sched-ctd
fix scheduled stop test for containerd on docker driver
2021-11-11 12:45:12 -08:00
Sharif Elgamal d226d04eab fix schedule stop test for containerd on docker driver 2021-11-10 09:09:50 -08:00
Akihiro Suda d7e728487c
Support CRI-O runtime with Rootless Docker driver
Follow-up to PR 12359 (containerd runtime with Rootless Docker driver).

Usage (needs cgroup v2):
```
dockerd-rootless-setuptool.sh install
docker context use rootless
minikube start --driver=docker --container-runtime=cri-o
```

See site/content/en/docs/drivers/includes/docker_usage.inc

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-11-09 16:09:52 +09:00
Sharif Elgamal df14157e9f fix formatting 2021-11-08 17:22:51 -08:00
Sharif Elgamal 93e267c5ae Allow custom cert for ingress to be overwritten 2021-11-08 17:16:00 -08:00
Sharif Elgamal 12f3d7aff1
Merge pull request #12861 from sharifelgamal/node-add-step
register node add initial step
2021-11-04 14:54:17 -07:00
Medya Ghazizadeh 94c74a2f52
Merge pull request #12848 from medyagh/no_kubernetes
Add --no-kubernetes flag  to start minikube without kubernetes
2021-11-04 14:46:48 -07:00
Sharif Elgamal 2e65c15d2b register node add initial step 2021-11-04 13:12:57 -07:00
Medya Gh 92cf41d686 do not set global viper config 2021-11-04 12:22:29 -07:00
Medya Gh a108c71ea9 remove comment 2021-11-04 11:16:27 -07:00
Medya Ghazizadeh 630e02d96b
Update cmd/minikube/cmd/start.go
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
2021-11-04 11:10:18 -07:00
Sharif Elgamal 65ed4ad45f
Merge pull request #12839 from spowelljr/addonListNotRunning
`minikube addons list` tests
2021-11-03 21:50:47 -07:00
Daehyeok Mun a88aec8b46 Support copy file from node to local host or between nodes. 2021-11-03 14:49:32 -07:00
Medya Gh 5bcdba0a09 add more constants 2021-11-03 14:16:04 -07:00
Medya Gh cd9d263b9f address review comments 2021-11-03 14:13:26 -07:00
Medya Gh bfdc3cfdea address review comments 2021-11-03 14:13:04 -07:00
Medya Gh 3d0f486d84 add integration test for --no-kubernetes 2021-11-03 14:08:01 -07:00
Steven Powell f0f1819123 output empty addons objects on JSON 2021-11-03 10:12:41 -07:00
Medya Gh 79f1b8c55c add --no-kubernetes flag to start minikube without kubernetes 2021-11-02 15:41:40 -07:00
Sharif Elgamal 3342d3aa34
Merge pull request #12811 from nbusseneau/pr/fix-virtualbox-ip
virtualbox: change default `host-only-cidr`
2021-11-02 13:38:16 -07:00
Medya Ghazizadeh 9dde4cb9c1
Merge pull request #12841 from Keyhoh/issue/refix-11348
fix zsh completion
2021-11-02 11:41:23 -07:00
Nicolas Busseneau 02a43c52e2
virtualbox: change default `host-only-cidr`
We change the default `--host-only-cidr` to `192.168.59.1/24` in order
to be compatible with the new default host-only networking restrictions
implemented in VirtualBox 6.1.28.

This fixes access denied errors on `minikube start` when using
VirtualBox >= 6.1.28:

```
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp
```

More details:

VirtualBox 6.1.28 introduced new restrictions on host-only networking:
https://www.virtualbox.org/wiki/Changelog-6.1#v28

Manual: https://www.virtualbox.org/manual/ch06.html#network_hostonly

> On Linux, Mac OS X and Solaris Oracle VM VirtualBox will only allow IP
> addresses in 192.68.56.0/21 range to be assigned to host-only
> adapters. For IPv6 only link-local addresses are allowed. If other
> ranges are desired, they can be enabled by creating
> /etc/vbox/networks.conf and specifying allowed ranges there. For
> example, to allow 10.0.0.0/8 and 192.168.0.0/16 IPv4 ranges as well as
> 2001::/64 range put the following lines into /etc/vbox/networks.conf:
>
>      * 10.0.0.0/8 192.168.0.0/16
>      * 2001::/64
>
> Lines starting with the hash # are ignored. Next example allows any
> addresses, effectively disabling range control:
>
>      * 0.0.0.0/0 ::/0

These new restrictions manifest in the form of the following issue on
`minikube start` due to the default `--host-only-cidr` used by the
VirtualBox driver being `192.168.99.1/24`:

```console
😄  minikube v1.23.2 on Ubuntu 18.04
  Using the virtualbox driver based on user configuration
👍  Starting control plane node minikube in cluster minikube
🔥  Creating virtualbox VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🔥  Deleting "minikube" in virtualbox ...
🤦  StartHost failed, but will try again: creating host: create: creating: Error setting up host only network on machine start: /usr/bin/VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.99.1 --netmask 255.255.255.0 failed:
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

🔥  Creating virtualbox VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
😿  Failed to start virtualbox VM. Running "minikube delete" may fix it: creating host: create: creating: Error setting up host only network on machine start: /usr/bin/VBoxManage hostonlyif ipconfig vboxnet1 --ip 192.168.99.1 --netmask 255.255.255.0 failed:
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

  Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: creating: Error setting up host only network on machine start: /usr/bin/VBoxManage hostonlyif ipconfig vboxnet1 --ip 192.168.99.1 --netmask 255.255.255.0 failed:
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

╭───────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                           │
│    😿  If the above advice does not help, please let us know:                             │
│    👉  https://github.com/kubernetes/minikube/issues/new/choose                           │
│                                                                                           │
│    Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue.    │
│                                                                                           │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
```

While the above is the primary error, other errors will be reported if
the adapter already exists (this happens when the adapter was created
before updating to VirtualBox 6.1.28, on a version of VirtualBox without
the new restrictions). Some examples:

```
 Exiting due to IF_VBOX_NOT_VISIBLE: Failed to start host: creating host: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
```

```
  minikube is unable to connect to the VM: dial tcp 192.168.99.112:22: i/o timeout

	This is likely due to one of two reasons:

	- VPN or firewall interference
	- virtualbox network configuration issue

	Suggested workarounds:

	- Disable your local VPN or firewall software
	- Configure your local VPN or firewall to allow access to 192.168.99.112
	- Restart or reinstall virtualbox
	- Use an alternative --vm-driver
	- Use --force to override this connectivity check

  Exiting due to GUEST_PROVISION: Failed to validate network: dial tcp 192.168.99.112:22: i/o timeout
```

When switching to a valid CIDR, `minikube start` works as usual:

```console
😄  minikube v1.23.2 on Ubuntu 18.04
  Using the virtualbox driver based on user configuration
👍  Starting control plane node minikube in cluster minikube
🔥  Creating virtualbox VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.22.2 on Docker 20.10.8 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🔎  Verifying Kubernetes components...
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
```

Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
2021-11-02 15:30:46 +01:00
Keyhoh ca928b43ed fix: revert wrong fix and re-fix zsh completion 2021-11-02 22:57:43 +09:00
Steven Powell 4c4adff43a add tests 2021-11-01 17:39:46 -07:00
Steven Powell 389ea688ff `minikube addons list` shows addons if cluster does not running 2021-11-01 12:44:44 -07:00
Medya Ghazizadeh 6f72fc9a25
Merge pull request #12578 from AliyunContainerService/aliyun-mirror
Initial support for adding Aliyun mirror for preload images and K8s release binaries
2021-10-26 13:22:30 -07:00
Medya Gh c8cb7a3c2d delete older minikube version preload files on start tup 2021-10-21 14:54:14 -07:00
Steven Powell d7decc2a8d persist mount settings after stop 2021-10-18 15:40:48 -07:00
Steven Powell c073e65c6d
Merge pull request #12716 from spowelljr/fixHyperVStop
Kill mount process before stopping nodes
2021-10-18 14:33:09 -07:00
Piotr Resztak 21d08dd0ed remove duplicated update of MinikubeISO 2021-10-16 13:34:06 +02:00
Steven Powell 99661e64a3
Merge pull request #12711 from spowelljr/fixMount
Fix mounting on non-default profile
2021-10-15 12:57:24 -07:00
Steven Powell 645b739d88 kill mount before stopping nodes 2021-10-15 10:52:39 -07:00
Steven Powell 0fcf1eddec remove unnecessary join 2021-10-15 09:14:18 -07:00
Steven Powell 9a89855997 add backwards compatible mount-process delete 2021-10-14 16:01:59 -07:00
Steven Powell 2a489bf7e1 fix mounting on non-default profile & make mounting processes cluster independent 2021-10-14 14:44:51 -07:00
Carlos Santana 2f0e883e60 make options command discoverable in minikube help 2021-10-14 13:15:06 -04:00
Dimitris Aragiorgis 4535640b63 Support changing apiserver-ips when restarting minikube
After commit bee6815, we could not change the apiserver-ips after
initial `minikube start`. Revert to previous behavior where both
apiserver-ips and apiserver-names were taken always into account
and certs were updated accordingly.

Fixes #9818
2021-10-11 05:28:30 -04:00
KallyDev 70022d9b2e
Move from deprecated ioutil to os and io packages 2021-10-08 08:57:19 +08:00
Steven Powell 7f827f93b3
Merge pull request #11752 from RA489/fix_ui
Minikube stop - correct the number of stopped nodes
2021-10-06 12:59:18 -04:00
RA489 ce2602c157 Minikube stop - correct the number of stopped nodes 2021-10-06 09:35:34 +05:30