Commit Graph

2832 Commits (75feb083f3973671a40dcafe4e7fbf3cf2c301b4)

Author SHA1 Message Date
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
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
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
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
Steven Powell 4c6f03c376
Merge pull request #12246 from spowelljr/fixMinikubeLogsWindows
Don't error if we can't retrieve logs from a pod during `minikube logs`
2021-10-01 09:58:32 -07:00
Steven Powell a502d3e2e1
Merge pull request #12420 from Keyhoh/issue/11348
fix issue #11348 zsh completion broken
2021-09-28 18:41:58 -07:00
Keyhoh 1976f71548 fix: zsh completion broken 2021-09-29 06:21:33 +09:00
Steven Powell 25b73c79f9 add back warning output 2021-09-28 10:20:10 -07:00
Medya Ghazizadeh 2fd09e11a8
Merge pull request #12149 from afbjorklund/build-cp
Build images on the primary control plane
2021-09-27 19:11:04 -07:00
Steven Powell f85e7db048
Merge pull request #12233 from kadern0/issue-10495
Added port validation
2021-09-27 15:56:03 -07:00
Pablo Caderno 4e1bcc06ce Fixed error exit. Added docs 2021-09-28 08:43:19 +10:00
Li Yi eb66c6797e Initial support for adding Aliyun mirror for preload images and Kubernetes binaries
Signed-off-by: Li Yi <denverdino@gmail.com>
2021-09-26 15:36:36 +08:00
Sharif Elgamal 4307e834df address review comments 2021-09-24 11:47:10 -07:00
Steven Powell e7723c79dd return 0 exit code if failed to get container logs 2021-09-23 13:22:31 -07:00
Sharif Elgamal 77051a35df make sure to set expiration if not in existing config 2021-09-22 11:22:08 -07:00
Sharif Elgamal 1212848649 make cert expiration configurable and add test 2021-09-21 16:17:52 -07:00
Steven Powell f21263390c add warning for ambassador addon 2021-09-14 14:01:07 -07:00
Medya Ghazizadeh 9f96701d8f
Merge pull request #12458 from minikube-bot/auto_bump_golint_version
bump golint version
2021-09-13 16:30:45 -07:00
Steven Powell 145f9fc9ab run `go fmt` 2021-09-13 11:58:43 -07:00
Sharif Elgamal 96923883e7 fixes for ingress 2021-09-09 13:47:01 -07:00
Steven Powell 3e25ee3dfe
Merge pull request #12381 from jayesh-srivastava/master
Updated version.go with crun version
2021-09-09 10:51:33 -07:00
Steven Powell 9d940e234f ask user for config values even if already set 2021-09-08 12:19:48 -07:00
Sharif Elgamal 738eb5177c
Merge pull request #12231 from sharifelgamal/gcp-cs
gcp-auth: improve flow for GCE/Cloud Shell
2021-09-01 13:20:06 -07:00