Commit Graph

452 Commits (d7c0b48e3b3d4fcd6c038b929a4d517afec3898f)

Author SHA1 Message Date
priyawadhwa 8f128a7d10 Enable gvisor addon in minikube (#3399)
This PR adds the code for enabling gvisor in minikube. It adds the pod
that will run when the addon is enabled, and the code for the image
which will run when this happens.

When gvisor is enabled, the pod will download runsc and the
gvisor-containerd-shim. It will replace the containerd config.toml and
restart containerd.

When gvisor is disabled, the pod will be deleted by the addon manager.
This will trigger a pre-stop hook which will revert the config.toml to
it's original state and restart containerd.
2018-12-07 15:27:22 -08:00
Thomas Strömberg ad415e252d
Merge pull request #3401 from tstromberg/cherry-2f81d
Add apiserver check to "status", and block "start" until it's healthy.
2018-12-07 15:20:07 -08:00
priyawadhwa ed8f7124a0 Only restart docker service if container runtime is docker (#3426)
* Only restart docker service if container runtime is docker

Only allow the buildroot provisioner to restart docker if the container
runtime is docker. This change should fix the bug in #3424, since now
docker will not be restarted if the container runtime is containerd.

* Added files to fix FileContent--proc-sys-net-bridge-bridge-nf-call-iptables precheck error

From this issue: https://github.com/kubernetes/kubeadm/issues/1062
these files need to be added to prevent this precheck error (which occurs when running any container runtime that isn't docker).

Also, save the machine config on the user's filesystem earlier so that the buildprovisioner can access it.
2018-12-07 12:08:59 -08:00
Thomas Stromberg 1ceb3e050b Make errors retriable 2018-12-03 21:07:39 -08:00
Thomas Stromberg d0cfb28b8e apiserver, not api-server 2018-12-03 20:32:48 -08:00
Thomas Stromberg eae6efdc85 Verify status before mounting 2018-12-03 20:29:02 -08:00
Thomas Stromberg cb3624dd08 Add apiserver health checks 2018-12-03 20:11:42 -08:00
Thomas Strömberg bc67a32a7b
Merge pull request #3332 from dlorenc/rmaddons
Remove both the CoreDNS and KubeDNS addons. Let Kubeadm install the c…
2018-12-03 17:15:06 -08:00
Anders Björklund 57f4d9247e Only require docker for the docker runtime (#3303)
Closes #3295
2018-11-27 14:15:08 -08:00
Joey 41bd1de699 Implement a check to see if an ISO URL is valid (#3287)
* Implement a check to see if an ISO URL is valid

* Use strings.TrimPrefix instead of []rune casting for 'file://' prefix removal

* Handle file permissions error with a user-friendly message
2018-11-26 16:29:47 -08:00
Balint Pato 4b11d63da1
debugging improvements and flakiness reduction (#3363)
Small improvements to debugging and reducing integration test flakiness: 
* added logging to kubeadm init in the SSHExecutor
* increasing timeout for RBAC creation via the kubernetes client set 
* only log tunnel output to test logger
2018-11-26 10:18:28 -08:00
Balint Pato a681603daa
Fix `minikube tunnel` for hyperkit (#3349)
This change is a bit of a hack to make IP routing work over the virtio-net interface - it forces the virtio-net interface (bridge100) created by hyperkit/xhyve to reset via removing and readding the single member of the interface. Without this "reset" packets are just simply lost most of the time, despite a completely healthy IP route.

This error was also the reason for a large percentage of our integration test failures. While reducing the flakiness of tunnel related tests I also increased the timeout requirement and adding retries to the nginx request in TestTunnel.
2018-11-21 13:39:48 -08:00
dlorenc 2091f8c27a
Remove both the CoreDNS and KubeDNS addons. Let Kubeadm install the correct DNS addon. 2018-11-16 14:54:44 -08:00
priyawadhwa 77942bbf94 Restart containerd after stopping alternate runtimes (#3343)
After stopping any runtimes that aren't being used, if we're using
containerd then we need to restart it. This is because it competes with
cri-o to listen on port 10010, causing a necesary plugin to not be
installed. After stopping cri-o, we need to restart containerd so that
the plugin is installed.

I also added some preflight checks when using alternative runtimes.
kubeadm checks to make sure the Docker service is running, so I disabled
that. It also checks if a few ports are available; these are ports that
containerd uses, so I also added them to the ignore list.

This should finish the work started in #3211, which stopped alternative
runtimes but didn't restart containerd. I was able to run "minikube
start" with containerd locally with this change.
2018-11-16 11:48:24 -08:00
dlorenc 4e5623e4fa Fix error formatting 2018-11-15 16:36:30 -06:00
Anders Björklund b69fc99d62 Stop docker daemon, when running cri-o (#3211)
* Stop extra container runtimes, before bootstrapper

The minikube.iso starts every runtime, by default

* Disable docker-env output, if docker isn't running

Might be running an alternative container runtime
2018-11-14 16:43:07 -08:00
Anders Björklund 2ceec0d084 Add config parameter for the cri socket path (#3154)
* Add config parameter for the cri socket path

Closes #3153

* Remove stray newline, when not using criSocket

* Add the --cri-socket parameter to configuration

Also fix the syntax for CRI-O, adding unix://
2018-11-14 16:36:02 -08:00
Thomas Stromberg a9d7c41056 One last rune->byte switch 2018-11-09 15:16:36 -08:00
Thomas Stromberg 810a6c70ef Update strings to reflect that a byte is returned instead of a rune 2018-11-09 15:16:05 -08:00
Thomas Stromberg 81815182c7 Use io.ByteReader interface 2018-11-09 15:11:58 -08:00
Thomas Stromberg 9013a57e58 Timeout when reading host:port from older kubectl versions.
kubectl releases older than August 2017 don't include a newline, which
means there is effectively no hint that the output has completed. I
believe this is why tests have been failing on the macOS.

Should resolve test timeout panics such as #3203
2018-11-09 15:03:08 -08:00
Bartel Sielski dd196abe30 Remove newline at the start of zsh completion file
Signed-off-by: Bartel Sielski <bsielski@nalys-group.com>
2018-10-30 11:23:46 +01:00
Thomas Stromberg 72e596507a Merge branch 'master' into consistent_err_formatting 2018-10-19 14:08:35 -07:00
Balint Pato ae9f4b20c7
minikube tunnel (#3015)
This commit introduces a new command, `minikube tunnel`, a LoadBalancer emulator functionality, that must be run with root permissions.

This command:

* Establishes networking routes from the host into the VM for all IP ranges used by Kubernetes.
* Enables a cluster controller that allocates IPs to services external `LoadBalancer` IPs.
* Cleans up routes and IPs when stopped (Ctrl+C), when `minikube` stops, and when `minikube tunnel` is ran with the `--cleanup` flag
2018-10-18 11:01:47 -07:00
Thomas Stromberg fd0d46680e Respect the -p flag to set the appropriate profile. 2018-10-04 11:35:24 -07:00
Thomas Stromberg 534325e88f Use %v for errors instead of %s 2018-10-03 21:57:17 -07:00
Thomas Stromberg c079bb1934 Update integration tests to handle newly persistant dashboard. 2018-10-03 15:06:30 -07:00
Thomas Stromberg d38705a42b Fix overzealous replacement of namespace -> ns that broke URL generation 2018-10-03 13:58:25 -07:00
Thomas Stromberg 2956621c20 Add function comments, improve proxy stdout log message 2018-10-03 13:30:09 -07:00
Thomas Stromberg 4c35c505f6 Double HTTP wait time and make error messages more readable. 2018-10-03 13:22:36 -07:00
Thomas Stromberg ac6dacff4a Address lint issues resulting from the dashboard proxy refactor. 2018-10-03 13:14:47 -07:00
Thomas Stromberg 8fd45bc751 Block until the proxy URL is healthy.
This is necessary now that there is no proper service endpoint to block
on.
2018-10-03 13:00:13 -07:00
Thomas Stromberg df54c6a5b4 Use "kubectl proxy" instead of a NodePort to expose the dashboard.
This provides an additional level of security, by enforcing host checking, applying port randomization, and requiring explicit user intent to expose the service to the host.
2018-10-02 22:25:45 -07:00
Thomas Stromberg 3706b3b8ac Fix dangling format issues. 2018-09-28 16:48:37 -07:00
Thomas Stromberg 055c8002b1 Replace %s format directives with %v for errors.
Previously we were mixed between the two forms. This commit picks %v,
which is consistent with the Kubernetes code base. They both effectively
do the same thing in this case, though %v works with any object, and %s
only with string objects.
2018-09-28 16:05:27 -07:00
Arijit Basu bed9aabaf8 Stay in same line 2018-09-10 12:15:28 -05:00
Jason Stangroome 9b21d3c7e4 Allow certificates to be optionally embedded in .kube/config
Opt-in with `minikube config set embed-certs true`. Similar to the
behaviour of `kubectl config set-credentials --embed-certs`.

Enables Minikube on Windows to produce a .kube/config file that
can be shared directly with kubectl inside the Windows Subsystem
for Linux (WSL) without needing to perform additional translation
of the certificate paths within the configuration file.
2018-09-03 15:34:50 -05:00
Asbjørn Apeland 5a78ac92f6 Change Linux install method
Previously, files installed to /usr/local/bin/ would be owned by the
user executing the command, not root. This change makes these installed
files owned by root instead. Improving security is the goal.
2018-07-31 10:55:22 -07:00
dlorenc deb2ded956 Add back version flag. 2018-07-24 12:36:42 -07:00
dlorenc a3b7a56ae0 Remove the call to validatek8sversion. 2018-07-24 12:36:42 -07:00
Aaron Prindle 8264dc0a12 fix issue where version was not being set 2018-07-24 12:36:42 -07:00
Aaron Prindle a4606583e4 remove all localkube references from code, change /var/lib/localkube to /var/lib/minikube 2018-07-24 12:36:42 -07:00
dlorenc 15b035748c Manual changes to remove localkube. 2018-07-24 12:36:42 -07:00
Dusty Rip 2dea4e1051 Allow zsh completion to be autoloaded by compinit 2018-07-18 09:44:35 -07:00
kairen ad576faae9 Reuse the FeatureGates field to parse kubeadm and component feature gates 2018-07-16 08:09:09 -07:00
kairen ccaec1db0e Add feature gates support for Kubeadm 2018-07-16 08:09:09 -07:00
Rohit Agarwal 96079478a7 Add nvidia-driver-installer and nvidia-gpu-device-plugin addons. 2018-07-08 22:25:48 -07:00
Rohit Agarwal 268c932240 Add GPU support to minikube. 2018-07-08 22:25:48 -07:00
Peter Trotman 3dfea62fd4 Changed the nodes within the VM to use a NodeName variable that is
seperate from the VM Machine Name to ensure proper functionality when
using different profile names.
2018-06-18 08:39:11 -07:00
dlorenc 305e803316 Bump Docker API Verson. 2018-06-05 13:45:01 -07:00