Commit Graph

2868 Commits (db7d975ed8b2b538b5a8c0a77bd5c8a2094de8ab)

Author SHA1 Message Date
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