Commit Graph

819 Commits (fb8a47f4416423e75c5ced2c01dd4bec6b8faeef)

Author SHA1 Message Date
Sharif Elgamal e1decae772 move locale detection to main 2019-05-03 14:08:14 -07:00
Sharif Elgamal 5f42672c8a gofmt 2019-05-03 13:01:54 -07:00
Sharif Elgamal 0bf293b019 Move setting locale to start 2019-05-03 12:50:02 -07:00
Thomas Strömberg 163e74f7ba
Merge pull request #4191 from tstromberg/stale-mount-pid
Make handling of stale mount pid files more robust
2019-05-02 18:49:57 -07:00
Anders F Björklund 292f4ec49b Add new kubectl command 2019-05-02 20:38:52 +02:00
Thomas Strömberg 63bfd32ad3
Revert "Initial implementation of kubectl command" 2019-05-02 11:26:04 -07:00
Sharif Elgamal ec6fc41ac5
Merge pull request #3646 from afbjorklund/kubectl
Initial implementation of kubectl command
2019-05-02 11:19:53 -07:00
tstromberg 5c154b0e03 Make KillMountProcess more robust, and failures a warning 2019-05-02 10:21:56 -07:00
Zhongcheng Lao 144f651385
Triggers repository detection only when --image-repository=auto 2019-05-02 19:07:45 +08:00
Himanshu Pandey fb0127f352 Fixed gofmt errors 2019-04-30 16:24:30 -07:00
Himanshu Pandey df0a0ad77c Unset the current-context on minikube stop 2019-04-30 00:02:05 -07:00
Marcos Diez 3eb340b527 don't attempt to pull docker images on relaunch when it's not an upgrade
fix syntax
2019-04-25 18:30:02 -03:00
Thomas Strömberg 167ab2e422
Merge pull request #4049 from RA489/updatecontextfix
update-context is confusing with profiles
2019-04-25 13:04:06 -07:00
Anders F Björklund ca26ae8afb Initial implementation of kubectl command 2019-04-25 21:07:57 +02:00
Zhongcheng Lao 39c0ec1fa0
Merge remote-tracking branch 'origin/master' into check-gcr-access 2019-04-24 23:52:34 +08:00
Thomas Stromberg a1637061a0 Improve comments 2019-04-23 13:43:17 -07:00
Thomas Stromberg 56bf985dc5 Download ISO image before Docker images, as it's required first 2019-04-23 13:35:16 -07:00
Zhongcheng Lao fa175590c4
Merge remote-tracking branch 'origin/master' into check-gcr-access 2019-04-18 20:52:26 +08:00
Anders F Björklund 677c497101 Systemd returns error on inactive, so allow that
The SSH infrastructure currently doesn't handle when the command
is _supposed_ to return an error, so allow this case explicitly.
2019-04-14 09:55:17 +02:00
Anders F Björklund b55507b50c Another complex function
17 cmd runStart cmd/minikube/cmd/start.go:165:1
2019-04-12 20:47:29 +02:00
Anders F Björklund a73dfc5f9e Merge branch 'master' into cyclo 2019-04-12 20:03:20 +02:00
RA489 84432d7c54 update-context is confusing with profiles 2019-04-12 10:59:16 +05:30
Jan Janik 6a2e7efc94 Fix broken build 2019-04-12 14:16:57 +12:00
Thomas Strömberg 1e26bb0c0d
Merge branch 'master' into download 2019-04-11 12:20:36 -07:00
Thomas Strömberg 903e9c29c7
Merge pull request #4059 from marcosdiez/dont-cache-images-when-vmdriver-is-none
Don't cache images when --vmdriver=none
2019-04-10 12:33:05 -07:00
Marcos Diez 8f5fe19722 politically correct comment 2019-04-10 15:24:04 -03:00
Marcos Diez 2a826b14df shorter comment 2019-04-10 15:22:12 -03:00
Marcos Diez 3deee6322b removed line as requested 2019-04-06 07:23:16 -03:00
Marcos Diez 9bc73ebbaf code comments 2019-04-05 08:36:45 -03:00
Marcos Diez 3db7e9e252 Don't cache images when --vmdriver=none 2019-04-04 23:01:10 -03:00
Benn Linger d102550644 Fixed status checking with non-default apiserver-port. 2019-04-04 21:43:43 -04:00
Jat f64b343965
```#compdef``` must be the first line 2019-03-28 10:44:32 +08:00
Thomas Stromberg 9c94b2fac6 Merge branch 'master' into no-infinite-loops 2019-03-26 17:11:39 -07:00
Thomas Strömberg 950421d2d2
Merge pull request #3985 from tstromberg/mount-intr
More reliable unmount w/ SIGINT, particularly on kvm2
2019-03-26 15:32:53 -07:00
Thomas Stromberg 9edda72985 Block on cache downloads before using the results 2019-03-26 14:59:17 -07:00
Thomas Stromberg 807963ac74 Use r for mockRunner instead of h 2019-03-26 14:45:18 -07:00
Thomas Stromberg 6f516ff647 Merge branch 'master' into mount-names 2019-03-26 14:30:42 -07:00
Thomas Stromberg 7233a2d50d Allow mount to work when the uid/gid of docker changes 2019-03-26 14:27:50 -07:00
Anders F Björklund 0ebfe462b9 Add --download-only option to start command
Make it possible to download files without loading or installing,
and without starting the host... Download: ISO, binaries, images.
2019-03-26 21:43:54 +01:00
Anders F Björklund adcbcf113b Refactor: move cache calls into separate functions
Need to split out the caching functions, from the loading/copying.

Also need to make the lists accessible from outside the functions.
2019-03-26 21:43:18 +01:00
Thomas Stromberg c861ab7dc1 Switch mount ssh impl from native to CommandRunner 2019-03-26 12:14:06 -07:00
Anders F Björklund 411b1162cb Fix another high score
16 config EnableOrDisableAddon cmd/minikube/cmd/config/util.go:105:1
2019-03-26 20:05:18 +01:00
Thomas Strömberg 9deb531889
Merge pull request #3947 from afbjorklund/hidden
Add explicit kvm2 flag for hidden KVM signature
2019-03-25 18:58:05 -07:00
Thomas Strömberg a1317476c2
Merge pull request #3931 from tstromberg/bring_ya_errs_to_the_project_maybe_we_can_solve_it
Add solution catalog to help users who run into known problems
2019-03-25 18:33:07 -07:00
Anders F Björklund 6491e35c20 Add explicit kvm2 flag for hidden KVM signature 2019-03-24 09:47:38 +01:00
Zhongcheng Lao 8c28ca4202
Select an accessible image repository for some users
Now it's possible to fallback to a mirror site for those users
who cannot access the main k8s.gcr.io repository. You may also
set the --image-mirror-country to forcibly use a known local
mirror in the specific location.

Signed-off-by: Zhongcheng Lao <Zhongcheng.Lao@microsoft.com>
2019-03-23 16:58:55 +08:00
Thomas Strömberg 702d471308
Merge pull request #3714 from laozc/custom-image-repository
Add --image-repository flag so that users can select an alternative repository mirror
2019-03-22 09:24:18 -07:00
Zhongcheng Lao daec030cdf Render asset template when enabling/disabling addon 2019-03-22 15:28:20 +08:00
Thomas Strömberg cbac94a53d
Merge pull request #3879 from marcosdiez/extra_config_for_kubeadm
--extra-config now work for kubeadm as well
2019-03-21 22:03:06 -07:00
Thomas Stromberg 37e259f7ea Implement the new problem package 2019-03-21 21:44:51 -07:00
Zhongcheng Lao 7ae074106c Merge remote-tracking branch 'origin/master' into custom-image-repository 2019-03-22 10:42:09 +08:00
Thomas Stromberg 5b46539be8 Fix merge conflict between e09133892f and 46640cef68 2019-03-21 16:11:16 -07:00
Thomas Strömberg ed58b6fc35
Merge pull request #3917 from tstromberg/cache_me_outside_how_bout_dat
start: Set the default value of --cache to true
2019-03-21 14:29:24 -07:00
Thomas Strömberg 88c45bf5b2
Merge branch 'master' into lint 2019-03-21 11:34:45 -07:00
Thomas Strömberg 20b9cfd0f3
Merge pull request #3897 from u5surf/issue-3878
Replace server name in updateKubeConfig if --apiserver-name exists #3878
2019-03-21 11:33:54 -07:00
Thomas Strömberg 6bf6290013
Merge pull request #3861 from RA489/featuregate
feature-gates via minikube config set
2019-03-21 11:33:41 -07:00
Thomas Strömberg f9a136a2f2
Merge pull request #3841 from afbjorklund/reportcard
Address the low-hanging fruit on report card
2019-03-21 11:33:28 -07:00
Thomas Strömberg 460ef571e2
Merge branch 'master' into lint 2019-03-21 11:32:47 -07:00
Thomas Stromberg 034c5f0252 Merge branch 'master' into mount-intr 2019-03-21 11:24:26 -07:00
Thomas Strömberg 2d4e560d30
Merge pull request #3834 from tstromberg/proxy-plumbing
Automatically propagate proxy environment variables to docker env
2019-03-21 10:27:37 -07:00
Marcos Diez 7de36ed9a1 allow --extra-config work on kubeadm as well. example: --extra-config kubeadm.ignore-preflight-errors=SystemVerification
missing variable
2019-03-21 06:33:46 -03:00
Zhongcheng Lao daeb238766 Merge remote-tracking branch 'origin/master' into custom-image-repository 2019-03-21 13:23:11 +08:00
Thomas Stromberg c848103ab1 start: Set the default value of --cache to true 2019-03-20 21:49:22 -07:00
Thomas Strömberg 2579c73e11
Merge pull request #3875 from steved/fix-change-user-none
fix CHANGE_MINIKUBE_NONE_USER regression from recent changes
2019-03-20 20:11:06 -07:00
Thomas Stromberg 79aafd525f Merge branch 'master' into mount-intr 2019-03-20 19:56:43 -07:00
Thomas Strömberg 6751e394f8
Merge pull request #3833 from afbjorklund/cruntime-version
Cruntime version
2019-03-20 19:55:45 -07:00
Thomas Strömberg 0d6c92153f
Merge branch 'master' into reportcard 2019-03-20 19:16:02 -07:00
Thomas Stromberg 0197b12a82 Make mount type a flag instead of a hardcoded string 2019-03-20 17:13:32 -07:00
Thomas Strömberg 4756b15bc1
Merge branch 'master' into lint 2019-03-20 10:16:09 -07:00
u5surf a34a9d32e6 Replace server name in updateKubeConfig if --apiserver-name exists #3878 2019-03-18 22:15:56 +09:00
Anders F Björklund 5497b966be Rename stutter and move classes between packages
Removing the kubeconfig module is probably not a big deal,
since it was already hiding under the "util" directory...

But the layout of the Bootstrapper is slightly irritating,
as long as it is contained in a different "kubeadm" module.
2019-03-16 16:57:56 +01:00
Anders F Björklund dba916a016 Document all exported functions inside minikube
Make config get/set more symmetrical, as well.
2019-03-16 16:57:43 +01:00
Anders F Björklund edf46f003f Document all exported functions outside minikube 2019-03-16 16:57:37 +01:00
Zhongcheng Lao 40caf8317c Merge remote-tracking branch 'upstream/master' into custom-image-repository 2019-03-15 18:01:48 +08:00
Steven Davidovitz a94e0ac2f8 fix CHANGE_MINIKUBE_NONE_USER regression from recent changes
6c48048538 changed the order of the
startup script so that now the CHANGE_MINIKUBE_NONE_USER `chown` doesn't
actually kick in after the files are added.
2019-03-14 09:05:51 -07:00
RA489 8fc1d494fa [FEATURE] feature-gates via minikube config set 2019-03-12 17:55:07 +05:30
Thomas Stromberg 1b67196401 Improve options output 2019-03-11 16:25:43 -07:00
Thomas Stromberg c713b186e8 unmount on sigint/sigterm, --options and --mode, improve mount UI 2019-03-11 16:18:06 -07:00
Anders F Björklund 6d96a67456 Run go vet on all code, not just pkg and cmd 2019-03-10 14:33:24 +01:00
Anders F Björklund 61dd4ab1fd Address unused error, reported by ineffassign
minikube/cmd/minikube/cmd/env.go
    Line 330: warning: ineffectual assignment to err (ineffassign)
2019-03-10 13:41:59 +01:00
Anders F Björklund 112a66c21a Add some error reporting to the version method 2019-03-10 10:18:26 +01:00
Anders F Björklund 9b2fad5710 Show current version of the container runtime 2019-03-10 10:09:59 +01:00
Thomas Stromberg ecb6f3bb31 Automatically propagate proxy environment variables to docker env 2019-03-08 13:12:29 -08:00
Thomas Stromberg 56a51ffe0d Merge branch 'master' into cache_images_int_test2 2019-03-06 15:21:11 -08:00
Tom Reznik c4ee5eec08 fix incorrect style name mount 2019-03-04 23:59:46 +02:00
Anders F Björklund 46640cef68 Address all lint except undocumented and stutter
These two lint warnings still remain, after the cleanup:
"exported ... should have comment or be unexported"

"type name will be used as foo.FooBar by other packages,
 and that stutters; consider calling this Bar"
2019-03-02 22:03:55 +01:00
Zhongcheng Lao ba5a02596f Change --image-repository usage text 2019-02-28 10:15:08 +08:00
Thomas Stromberg e09133892f Fix docker/containerd caching, improve msgs, add tests 2019-02-27 13:58:33 -08:00
Anders F Björklund 167d1584a6 Add flag for disabling the VirtualBox VTX check
Currently this is broken upstream, provide workaround...

Already available in docker-machine, so port to minikube.
2019-02-22 18:29:29 +01:00
Thomas Strömberg 3426326ed7
Merge pull request #3719 from tstromberg/none-doc-fix
chown command should be against user $HOME, not roots home directory.
2019-02-19 13:08:09 -08:00
Thomas Stromberg 245ec739ca chown command should be against user $HOME, not roots home directory. 2019-02-19 11:47:00 -08:00
Zhongcheng Lao 7cbe253ef6 Allow specifying image repository for docker images
Some users (especially for those in mainland China) may have issue
accessing the default image repository. This patchset allows users
to override the default image repository gcr.io to a different
repository by specifying --image-repository option in the command
line as a simple workaround. Images will be pulled from the
specified image repository instead of the default ones.

Example (using mirror by Aliyun):
minikube start ...
   --image-repository
   registry.cn-hangzhou.aliyuncs.com/google_containers
2019-02-18 01:00:12 +08:00
Thomas Stromberg 19c2f5cb44 Make non-zero ssh error codes less dramatic 2019-02-16 08:36:53 -08:00
Anders F Björklund 637e71fa4c Improve reporting when docker host/service is down
Don't just wait for a timeout, when SSH is not running.

Also improve the message, don't need to comment stderr.
2019-02-16 09:29:46 +01:00
Thomas Stromberg b80498fcb4 Merge from HEAD 2019-02-15 09:24:35 -08:00
Thomas Stromberg 4a1feb6531 Reduce text clutter 2019-02-15 07:16:41 -08:00
Thomas Stromberg 71eafef5ce Overhaul how we handle kubectl, as it isn't actually required except for the dashboard 2019-02-14 17:10:03 -08:00
Thomas Stromberg 35449f685e Merge remote-tracking branch 'upstream/master' 2019-02-14 16:21:31 -08:00
Thomas Stromberg 5d09d35302 Improve output strings when used by none driver 2019-02-14 16:21:21 -08:00
Thomas Stromberg c2194e191d Fix merge conflicts 2019-02-14 11:58:07 -08:00
Thomas Stromberg 4cfe77294d Fix style merge conflict 2019-02-14 11:25:42 -08:00
Thomas Strömberg 3714bbd787
Merge pull request #3659 from tstromberg/console
Clearer output when re-using VM's so that users know what they are waiting on
2019-02-14 11:03:50 -08:00
Thomas Stromberg 08da5fe3b5 Add pod logs to 'logs' command, show detected problems during minikube start 2019-02-13 21:29:20 -08:00
Thomas Stromberg 69f72ea991 Add exit.go, remove call to exit.Fail 2019-02-13 12:47:02 -08:00
Thomas Stromberg 5f65dc80fa Remove error uploads, consolidate fatal error handling into exit package 2019-02-13 12:37:44 -08:00
Thomas Stromberg 1c09ba2a48 Make the output clearer and less cluttered 2019-02-13 09:41:53 -08:00
Thomas Stromberg e74db39783 Issue a poweroff request before deleting a VM. Avoids HyperV hang 2019-02-13 09:21:58 -08:00
Yugo Horie 00aff6039b Fix to not execute clusterBootstrapper.Delete when clusterBootstrapper is nil #3662 2019-02-13 10:08:06 +09:00
Thomas Stromberg ade3515f4f Disable Stackdriver error reporting until we can clean up the interface 2019-02-12 14:33:38 -08:00
Thomas Stromberg 3454c83dcf Clearer output when re-using VM's so that users know what they are waiting on 2019-02-12 13:54:30 -08:00
Anders F Björklund 0a91040434 Add DeleteCluster to bootstrapper
This matches StartCluster, and is used to revert
the changes done to reset the VM machine state.

Even if it fails, continue to deleting the VM...
Make sure to handle the case of missing config.
2019-02-12 19:49:19 +01:00
Thomas Stromberg 0a5b64eeaf Improve text strings for existing VM's and setting cluster permissions 2019-02-11 19:28:23 -08:00
Thomas Stromberg 452054bf25 Implement PR comments 2019-02-11 15:01:34 -08:00
Thomas Stromberg deb31b4230 Pull upstream, sort out merge conflicts, use ParseBool 2019-02-11 13:56:45 -08:00
Anders F Björklund 73dd006813 Replace string comparison with class method 2019-02-09 20:59:26 +01:00
Anders F Björklund 78806674f3 Merge branch 'master' into defaults 2019-02-09 18:25:27 +01:00
Thomas Strömberg 6e1b9d030c
Merge pull request #953 from denji/parallels
machine: add parallels support
2019-02-08 15:39:43 -08:00
Thomas Stromberg 6c48048538 Merge from hell #2: refactor start.go because it's terrible 2019-02-08 13:37:29 -08:00
Thomas Stromberg ee8ddd60a8 Merge 2019-02-07 18:21:29 -08:00
Thomas Stromberg 0f11c4de8e Remove unnecessary break statement 2019-02-07 16:14:47 -08:00
Thomas Stromberg e6c59fa135 Add back accidentally removed status line 2019-02-07 15:40:43 -08:00
Thomas Stromberg 9f09f02e39 Address PR comments, make sure PullImages code path is exercised 2019-02-07 15:39:31 -08:00
Thomas Stromberg f2d6f45538 More console work 2019-02-07 14:56:29 -08:00
Thomas Stromberg d1b0d0470a Initial console implementation 2019-02-06 22:00:30 -08:00
Thomas Stromberg 966b245dc6 Refactor and centralize container runtime code into a cruntime package 2019-02-05 14:42:12 -08:00
Anders F Björklund 6ff11e44a5 Remove default cni flags from the documentation 2019-02-05 20:05:05 +01:00
Anders F Björklund 0071a940a7 Need to check if changed, not the current value 2019-02-02 19:11:33 +01:00
Anders F Björklund 6e7fc9dbf5 Add cni default for alternative container runtimes
If using an alternative container runtime, and not having set
any other parameters already, default to cni plugin and config.
2019-02-02 18:36:46 +01:00
Anders F Björklund 1cb2ba06e1 Refactor: add variables for network configuration 2019-02-02 18:36:42 +01:00
Thomas Stromberg b19526ab6c minor de-linting: run gofmt, goimports, pre-allocate fields slice 2019-01-25 10:49:58 -08:00
Denis Denisov a1cd81bf1c machine: add parallels support 2019-01-25 10:31:26 +02:00
Thomas Strömberg b61207c233
Merge pull request #3391 from ivans3/logviewer-addon-pr7
Initial commit of logviewer addon
2019-01-24 16:00:29 -08:00
Thomas Strömberg ad2b762c51
Merge pull request #3286 from hidekazuna/fix_vm_driver_none
Fix to run sudo -E minikube start --vm-driver=none
2019-01-24 15:59:14 -08:00
Thomas Strömberg fd562f81b1
Merge pull request #3565 from twelvelabs/patch-1
Remove redundant newline in `minikube status`
2019-01-24 07:33:20 -08:00
Skip Baney 34aa0c6895
Remove redundant newline in `minikube status`
Both #3502 (which this commit reverts) and #3523 attempted to fix the same issue.
Keeping the change from the latter PR since it fixes it at the source template.
2019-01-21 10:54:25 -06:00
Anders F Björklund 3389344d51 Need to restart crio, after stopping containerd
If it fails to start up, it will never try again.
2019-01-20 17:06:37 +01:00
Anders F Björklund 2c0b7da11e Stop containerd from running, if it is not desired
Apparently some grpc services are conflicting with crio

"Failed to start streaming server: listen tcp 10.0.2.15:10010: bind: address already in use"
2019-01-20 17:02:36 +01:00
Thomas Strömberg 56f8142e24
Merge pull request #3194 from afbjorklund/crictl.yaml
Write /etc/crictl.yaml when starting
2019-01-17 10:34:06 -08:00
Thomas Strömberg f29c0cd329
Merge pull request #3533 from tstromberg/kubeadm-log-output
Improve failure output when kubeadm init fails
2019-01-17 10:33:23 -08:00
Anders F Björklund c563c4d1fb Write /etc/crictl.yaml when starting 2019-01-17 07:27:28 +01:00
Thomas Stromberg c2bf394378 Minor improvements to output and comments 2019-01-16 12:14:56 -08:00
Thomas Strömberg 3aa83674a9
Merge pull request #3441 from brb/2907-no-cni-conf-by-default
Do not include the default CNI config by default
2019-01-15 17:14:20 -08:00
Thomas Strömberg 303e26cd56
Merge pull request #3494 from knabben/reporterror-test
Adding more utils tests
2019-01-15 17:13:23 -08:00
Thomas Strömberg 8bc8816c9f
Merge pull request #3521 from nixpanic/addons/gluster
Add a storage-provisioner-gluster addon
2019-01-15 17:08:45 -08:00
Thomas Strömberg 7b32547cf6
Merge pull request #3108 from sebcworks/sebcworks-customapiserverport
Allow to specify api server port through CLI fix #2781
2019-01-15 16:43:42 -08:00
Thomas Stromberg 393d1af3c6 mention 'minikube logs' for debugging start failures 2019-01-15 16:37:28 -08:00
Thomas Stromberg bf02c016b3 Make failure prompt text more clear 2019-01-15 16:37:04 -08:00
Thomas Strömberg 0a58301e3e
Merge pull request #3502 from narendra2019/master
issue# 3499: minikube status missing newline at end of output
2019-01-14 13:24:31 -08:00
Thomas Stromberg 3223e044e4 apiserver health: try up to 5 minutes, add newline 2019-01-11 11:49:49 -08:00
Niels de Vos b85b6d5eeb addons: mark the last enabled storage provider as default
When a storage provider is enabled (storage-provisioner-glusterfile),
mark it "is-default" and set "is-default" to "false" in all other
StorageClasses.
2019-01-09 20:04:21 +01:00
Niels de Vos b0c7341373 addons: when enabling storage-provisioner-gluster, mark other SCs non-default
There can only be one StorageClass be marked as default. When the
storage-provisioner-gluster addon is enabled, users expect it to be the
default StorageClass.

Instead of removing the "is-default" annotation from the other
StorageClasses, set it to "false". This leaves only the "glusterfile"
StorageClass as "is-default".
2019-01-09 20:04:21 +01:00
Niels de Vos 3c3b7368f0 Add storage-provisioner-gluster addon
With this addon dynamic provisioning based on Gluster can be enabled:

    $ minikube addons enable storage-provisioner-gluster

This will deploy several pods in a new 'storage-gluster' namespace:

 - glusterfs, storage service with a 10GB sparse /srv/fake-disk.img
 - heketi, a smart Gluster volume manager
 - glusterfile-provisioner, external-storage provisioner

In addition, the StorageClass 'glusterfile' will be created. It is
currently not configured as default StorageClass, so PVCs need to refer
to the new StorageClass.
2019-01-09 20:04:21 +01:00
Narendra Kangralkar 68287a9497 issue# 3499: minikube status missing newline at end of output
Done code changes to display newline at the end of the status message
2019-01-04 22:13:33 +05:30
Martynas Pumputis d982c4bf74 Do not include the default CNI config by default
Previously, minikube has been shipped with the default CNI config
(/etc/cni/net.d/k8s.conf) in its rootfs. This complicated a lot
when using a custom CNI plugin, as the default config was picked
by kubelet before the custom CNI plugin has installed its own CNI
config. So, the end result was that some Pods were attached to a
network defined in the default config, and some got managed by
the custom plugin.

This commit introduces the flag "--enable-default-cni" to
"minikube start" to trigger the provisioning of the default CNI
config.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
2019-01-03 09:23:29 +01:00
Amim Knabben 6762fb0096 Adding GetkubeConfig path test 2018-12-28 10:49:50 -02:00
Amim Knabben f948bf8136 Adding ReportError test and HTTP Test server reuse 2018-12-28 10:04:45 -02:00
Thomas Stromberg 1bd4b05bc8 Increase dashboard retry time from 30 seconds to 3 minutes 2018-12-21 14:14:36 -08:00
Thomas Stromberg f3d158198f Add helpful dashboard status messages to stderr 2018-12-21 12:00:43 -08:00
Thomas Stromberg dba0c0a0dc Disable dashboard by default 2018-12-21 11:49:20 -08:00
Thomas Strömberg ab64cb952e
Merge pull request #3479 from tstromberg/stop-retry
Make "stop" retry on failure.
2018-12-20 19:46:24 -08:00
Thomas Stromberg c250a3b9d9 Make "stop" retry on failure. 2018-12-20 13:19:53 -08:00
Balint Pato ed7031cbb3
Merge branch 'master' into logviewer-addon-pr7 2018-12-19 17:14:09 -08:00
Chris Eason c7e69fd257 Allow ServiceCIDR to be configured via 'service-cluster-ip-range' flag. 2018-12-18 12:17:33 -05:00
priyawadhwa 5d910e8937 Save old cluster config in memory before overwriting (#3450)
* Save old cluster config in memory before overwriting

In PR #3426, I changed "minikube start" to overwrite the cluster config earlier so that the container runtime could be extracted from it by the buildroot provisioner. This introduced a bug later on, where minikube expected to read the kubernetes version from theold config (which no longer existed, because the config was overwritten).

To fix this, I changed the code to store the old version of the config in memory before overwriting it.

This should fix #3447
2018-12-13 14:31:22 -08:00
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
ivans3 b43b8ccd9d Initial commit of logviewer addon 2018-12-02 12:58:06 -08:00
Hidekazu Nakamura 2ef8ff9256 Fix sudo -E minikube start
sudo -E minikube start --vm-driver=none does not change directory
owner when CHANGE_MINIKUBE_NONE_USER=true.
This patch fixes to change directory owner when
CHANGE_MINIKUBE_NONE_USER=true.
2018-11-28 02:08:29 +00: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
Sebastien Collin e551231ec5 Allow to specify api server port through CLI 2018-09-01 15:07:27 +02: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
seborama ee73cbde6b Added hyperkit options for enterprise VPN support
The purpose of these changes is to enhance Hyperkit support from the
minikube command line for better integration with enterprise networks
behind a VPN.

uuid: Provide VM UUID to restore MAC address (only supported with
      Hyperkit driver).
vpnkitSock: 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."
vsockPorts: List of guest VSock ports that should be exposed as sockets
            on the host (Only supported on with hyperkit now).

Note:
tests pass but file:
`vendor/github.com/google/certificate-transparency/go/x509/root_darwin.go`
has to be edited to correct an issue - not committed since this is in
the vendor directory.
2018-06-04 09:46:20 -07:00
Mark Gibbons 5ed8a7ef91 Made caching async with block for completion before copy of images into cluster. Default imageing caching to false 2018-06-04 08:15:12 -07:00
mlgibbons 0519b237a2 Addressed race condition caused by async image caching with no wait which resulted in unreliable image loading and prevented offline execution of "minikube start". 2018-06-04 08:15:12 -07:00
Li Yi 9198b04386 Fix error messages for enabling/disabling addon
Signed-off-by: Li Yi <denverdino@gmail.com>
2018-04-29 18:06:48 -07:00
AdamDang 12f1833ea9
Typo fix: Seperated list->Separated list
Seperated list->Separated list
2018-04-29 16:27:11 +08:00
dlorenc 0bf5166e14 Deprecate localkube. 2018-04-09 13:24:07 -07:00
Yongkun Anfernee Gui 0fa64b3bd8 Reorganize the minikube drivers
- Add registry to register all supported drivers in different platforms.
- Add DriverDef to define driver's metadata.
- All driver support logic moved to pkg/minikube/drivers, removed all
  driver name switches scattered in different packages.
2018-03-11 13:41:30 -07:00
David Muckle adb30393d1 Add metrics-server as an addon 2018-02-21 15:33:27 -05:00
Yongkun Anfernee Gui c07258b45a Fix more permissions 2018-02-09 14:32:53 -08:00
Steve Sloka 4d060d3bdb Bump registry-creds version 2018-02-07 20:09:20 -08:00
Chen Li 82ea016de7 Redirect command Stdout & Stderr for command_runner
CombinedOutput function return after command complete.
When we run a long run command, such as continuously get
new log entries, it failed to get run results.

Fixes: https://github.com/kubernetes/minikube/issues/2447
2018-02-05 09:18:49 -08:00
Remi FUSSIEN dde00ebfa3 Fix the description in the completion command 2018-02-02 18:57:29 +01:00
Matt Rickard c76b210393
Merge pull request #2486 from langyxxl/localkube-add-root-check
localkube add ROOT permission check
2018-02-01 16:42:26 -08:00
adolphlwq 9b3805d32f use readable env name 2018-01-31 21:04:49 +08:00
sheng zhang 8b5ffff2d9 localkube add ROOT permission check. 2018-01-30 14:48:18 +08:00
Colin Hoglund 479ca10c75 allow storage-provisioner to be disabled 2018-01-29 14:46:27 -05:00
Zvi Cahana 6e8bb2e0fa List addons in a consistent sort order 2018-01-24 08:11:44 -08:00
Matt Rickard ec1b443722
Merge pull request #2423 from kairen/add-freshpod-addon
Add freshpod as a new addon
2018-01-23 13:15:01 -08:00
Chen Li d11b74c493 Flush log message to file before exit
Fixes: https://github.com/kubernetes/minikube/issues/2435
2018-01-22 08:19:26 -08:00
Chen Li aa32282e3f Use IPSliceVar for apiServerIPs 2018-01-17 08:22:25 -08:00
Chen Li a3f3286f50 Allow add new server names and IPs to apiserver x509 certificate 2018-01-17 08:22:25 -08:00
kairen 250d602085 Add freshpod as a new addon 2018-01-12 22:57:32 +08:00
basp cebd704bd7 Issue #2416: Added UUID to hyperkit driver section in minikube configuration to be able to regenerate the same mac address for the machine after restarts to give DHCP a change of assigning the previously used IP address. 2018-01-11 09:41:35 -08:00
Suraj Deshmukh 5d7d751db8 Change the cri-o socket location to upstream default
Right now the cri-o socket is placed in `/var/run/crio.sock`, this
commit changes it to `/var/run/crio/crio.sock` which is similar to
upstream.

Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com>
2018-01-04 10:35:08 -08:00
Anders F Björklund 87f48f1731 Add config to avoid warning about the none driver
Even when starting up minikube in a dedicated virtual machine,
there will be a warning against running it on your workstation.
2018-01-03 09:47:24 -08:00
dlorenc 59274b22da Code review feedback. 2018-01-02 16:18:54 -08:00
Mohit Gupta 7d9413ccd1 remove the hyperkit prefix so we can move this to other drivers as well with time and fix vendoring issue 2018-01-02 16:18:54 -08:00
Mohit Gupta e1903b7423 support NFS sharing with the hyperkit driver 2018-01-02 16:18:54 -08:00
Matt Rickard 4077763003 Make none driver work with kubeadm 2018-01-02 12:01:37 -08:00
kairen 777b44695f Improve cache list command 2017-12-08 13:37:55 -06:00
kairen 37bc507e13 Remove duplicate the cache command 2017-12-08 13:37:55 -06:00
kairen c9f3abb0ed Fix gofmt check errors 2017-12-08 13:37:55 -06:00
kairen 1966dab625 Add cache list support 2017-12-08 13:37:55 -06:00