Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke kubectl if minikube binary is named 'kubectl' #8872

Merged
merged 7 commits into from
Sep 2, 2020

Conversation

kadern0
Copy link
Contributor

@kadern0 kadern0 commented Jul 29, 2020

Fixes issue #8857

Signed-off-by: Pablo Caderno [email protected]

./out/minikube version
minikube version: v1.12.1
commit: f8406b6f02d65c1cf8d42219c30d24acedc9e8c3-dirty
 ./out/minikube kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:14:22Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:07:13Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
 ./kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:14:22Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:07:13Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 29, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @kadern0. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 29, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kadern0
To complete the pull request process, please assign josedonizetti
You can assign the PR to them by writing /assign @josedonizetti in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@TravisBuddy
Copy link

Travis tests have failed

Hey @kadern0,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make test
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
gofmt -s -w pkg/minikube/assets/assets.go
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
/home/travis/gopath/bin/go-bindata
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
gofmt -s -w pkg/minikube/translate/translations.go
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.12.1 -X k8s.io/minikube/pkg/version.isoVersion=v1.12.0 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="9da0902f77bf40da98195287a8b23cadf689fcb9"" ./test.sh
= make lint =============================================================
golangci/golangci-lint info checking GitHub for tag 'v1.29.0'
golangci/golangci-lint info found version: 1.29.0 for v1.29.0/linux/amd64
golangci/golangci-lint info installed out/linters/golangci-lint
cmd/minikube/cmd/root.go:80: File is not `goimports`-ed (goimports)
		}
Makefile:390: recipe for target 'lint-ci' failed
make[1]: *** [lint-ci] Error 1
= go mod ================================================================
ok
= boilerplate ===========================================================
ok
Makefile:274: recipe for target 'test' failed
make: *** [test] Error 4
TravisBuddy Request Identifier: f2ca6770-d13e-11ea-b8d2-e37d5f97d09d

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we could add somewhere in the website about this undocumented feature..
How about adding an item to f.a.q page with a question and then answer .like how to use minikube's kubectl ...

@kadern0
Copy link
Contributor Author

kadern0 commented Aug 1, 2020

@medyagh I'd say adding an entry to the f.a.q pages and also documenting it here?

https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/kubectl.md

What do you think?

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 2, 2020
@kadern0 kadern0 requested a review from medyagh August 4, 2020 23:05
@medyagh
Copy link
Member

medyagh commented Aug 10, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 10, 2020
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mind adding an integration test for this? we already have a kubectl integraiton test
we can add something like this to it (it could be a Linux Only Test if it is hard to implement for windows)

dir, err := ioutil.WhateverMakeTempDirectory()
dest := , filepath.Join(dir, "kubectl")
copy.Copy("minikube", dest)
exec("PATH=%s", dir, "kubectl get po -A")

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [68.800189148 63.56739689999999 63.01048233]
Average time for minikube: 65.12602279266666

Times for Minikube (PR 8872): [62.85187793299999 61.867400352 63.215824725000004]
Average time for Minikube (PR 8872): 62.64503433666667

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8872) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.2 on Debian   |  0.052948 |           0.054721 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.017369 |           0.018252 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.010746 |           0.003234 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 39.613064 |          39.595412 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.3 | 23.367608 |          21.399383 |
| on Docker 19.03.12 ...         |           |                    |
| * Verifying Kubernetes         |  1.502218 |           1.321523 |
| components...                  |           |                    |
| * Enabled addons:              |  0.458526 |           0.179280 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.097587 |           0.069512 |
| configured to use "minikube"   |           |                    |
|                                |  0.005955 |           0.003717 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [27.923897411 27.105333571 25.75450592]
Average time for minikube: 26.927912300666666

Times for Minikube (PR 8872): [26.884199201 27.341777836000002 25.818418553]
Average time for Minikube (PR 8872): 26.681465196666664

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8872) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.2 on Debian   |  0.064443 |           0.065770 |
|                           9.11 |           |                    |
| * Using the docker driver      |  0.100927 |           0.103238 |
| based on existing profile      |           |                    |
| * Starting control plane node  |  0.055561 |           0.057417 |
| minikube in cluster minikube   |           |                    |
| * Creating docker container    |  8.524553 |           8.513732 |
| (CPUs=2, Memory=3700MB) ...    |           |                    |
| * Preparing Kubernetes v1.18.3 | 17.268659 |          17.043230 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  0.802149 |           0.811132 |
| components...                  |           |                    |
| * Enabled addons:              |  0.043298 |           0.018809 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.062200 |           0.064178 |
| configured to use "minikube"   |           |                    |
|                                |  0.006121 |           0.003959 |
+--------------------------------+-----------+--------------------+

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 11, 2020
cmd/minikube/cmd/root.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 17, 2020
@kadern0
Copy link
Contributor Author

kadern0 commented Aug 17, 2020

do you mind adding an integration test for this? we already have a kubectl integraiton test
we can add something like this to it (it could be a Linux Only Test if it is hard to implement for windows)

dir, err := ioutil.WhateverMakeTempDirectory()
dest := , filepath.Join(dir, "kubectl")
copy.Copy("minikube", dest)
exec("PATH=%s", dir, "kubectl get po -A")

Instead of copying the binary, I've created a hard link.

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [61.662832598 64.283893755 63.428841576999986]
Average time for minikube: 63.125189309999996

Times for Minikube (PR 8872): [62.526084555 65.221789642 64.34176651199999]
Average time for Minikube (PR 8872): 64.02988023633333

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8872) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.3 on Debian   |  0.057554 |                    |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.020017 |           0.017585 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.002971 |           0.003591 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 39.934563 |          40.686483 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.3 | 21.587614 |          21.308429 |
| on Docker 19.03.12 ...         |           |                    |
| * Verifying Kubernetes         |  1.348857 |           1.448235 |
| components...                  |           |                    |
| * Enabled addons:              |  0.090165 |           0.434326 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.075600 |           0.070483 |
| configured to use "minikube"   |           |                    |
|                                |  0.007848 |           0.005483 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [26.142872327000003 26.382122939000006 27.916494438999997]
Average time for minikube: 26.81382990166667

Times for Minikube (PR 8872): [27.673202739000004 26.427186228999997 26.080740510000002]
Average time for Minikube (PR 8872): 26.727043159333334

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8872) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.3 on Debian   |  0.065591 |                    |
|                           9.11 |           |                    |
| * Using the docker driver      |  0.101999 |           0.098682 |
| based on existing profile      |           |                    |
| * Starting control plane node  |  0.059750 |           0.057169 |
| minikube in cluster minikube   |           |                    |
| * Creating docker container    |  8.594392 |           8.522967 |
| (CPUs=2, Memory=3700MB) ...    |           |                    |
| * Preparing Kubernetes v1.18.3 | 17.091230 |                    |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  0.827617 |           0.839398 |
| components...                  |           |                    |
| * Enabled addons:              |  0.003217 |           0.140428 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.062198 |           0.061135 |
| configured to use "minikube"   |           |                    |
|                                |  0.007834 |           0.004302 |
+--------------------------------+-----------+--------------------+

@kadern0 kadern0 requested a review from medyagh August 17, 2020 06:16
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 17, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @kadern0,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make test
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
gofmt -s -w pkg/minikube/assets/assets.go
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
/home/travis/gopath/bin/go-bindata
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
gofmt -s -w pkg/minikube/translate/translations.go
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.12.3 -X k8s.io/minikube/pkg/version.isoVersion=v1.12.2 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="fe1f1e6f181242a0cc76b500e7052846650422b0" -X k8s.io/minikube/pkg/version.storageProvisionerVersion=v2" ./test.sh
= make lint =============================================================
golangci/golangci-lint info checking GitHub for tag 'v1.29.0'
golangci/golangci-lint info found version: 1.29.0 for v1.29.0/linux/amd64
golangci/golangci-lint info installed out/linters/golangci-lint
test/integration/functional_test.go:26: File is not `goimports`-ed (goimports)
	"io/ioutil"
Makefile:408: recipe for target 'lint-ci' failed
make[1]: *** [lint-ci] Error 1
= go mod ================================================================
unused golang.org/x/exp
ok
= boilerplate ===========================================================
ok
Makefile:292: recipe for target 'test' failed
make: *** [test] Error 4
TravisBuddy Request Identifier: caaaa5e0-e078-11ea-94f1-792e7c9a1c39

@TravisBuddy
Copy link

Travis tests have failed

Hey @kadern0,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make test
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
gofmt -s -w pkg/minikube/assets/assets.go
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
/home/travis/gopath/bin/go-bindata
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
gofmt -s -w pkg/minikube/translate/translations.go
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.12.3 -X k8s.io/minikube/pkg/version.isoVersion=v1.12.2 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="26e28c69a7e6920822c1f6e671c070c5c2392345" -X k8s.io/minikube/pkg/version.storageProvisionerVersion=v2" ./test.sh
= make lint =============================================================
golangci/golangci-lint info checking GitHub for tag 'v1.29.0'
golangci/golangci-lint info found version: 1.29.0 for v1.29.0/linux/amd64
golangci/golangci-lint info installed out/linters/golangci-lint
test/integration/functional_test.go:26: File is not `goimports`-ed (goimports)
	"io/ioutil"
Makefile:408: recipe for target 'lint-ci' failed
make[1]: *** [lint-ci] Error 1
= go mod ================================================================
unused golang.org/x/exp
ok
= boilerplate ===========================================================
ok
Makefile:292: recipe for target 'test' failed
make: *** [test] Error 4
TravisBuddy Request Identifier: b96d8370-e07c-11ea-94f1-792e7c9a1c39

@TravisBuddy
Copy link

Travis tests have failed

Hey @kadern0,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make test
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
gofmt -s -w pkg/minikube/assets/assets.go
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
/home/travis/gopath/bin/go-bindata
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
gofmt -s -w pkg/minikube/translate/translations.go
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.12.3 -X k8s.io/minikube/pkg/version.isoVersion=v1.12.2 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="8df038cf06e1fbb73773224d983f886a6c7a3116" -X k8s.io/minikube/pkg/version.storageProvisionerVersion=v2" ./test.sh
= make lint =============================================================
golangci/golangci-lint info checking GitHub for tag 'v1.29.0'
golangci/golangci-lint info found version: 1.29.0 for v1.29.0/linux/amd64
golangci/golangci-lint info installed out/linters/golangci-lint
test/integration/functional_test.go:26: File is not `goimports`-ed (goimports)
	"io/ioutil"
Makefile:408: recipe for target 'lint-ci' failed
make[1]: *** [lint-ci] Error 1
= go mod ================================================================
unused golang.org/x/exp
ok
= boilerplate ===========================================================
ok
Makefile:292: recipe for target 'test' failed
make: *** [test] Error 4
TravisBuddy Request Identifier: 60f76020-e07d-11ea-94f1-792e7c9a1c39

Signed-off-by: Pablo Caderno <[email protected]>
@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [62.598742455 63.290907999000005 64.92910673799999]
Average time for minikube: 63.60625239733334

Times for Minikube (PR 8872): [63.117536169000005 62.041956058 63.327481860000006]
Average time for Minikube (PR 8872): 62.82899136233334

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8872) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.3 on Debian   |  0.059516 |           0.055711 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.019219 |           0.018948 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.012431 |           0.003648 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 40.329686 |          40.253888 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.3 | 21.621260 |          20.829010 |
| on Docker 19.03.12 ...         |           |                    |
| * Verifying Kubernetes         |  1.409014 |           1.272052 |
| components...                  |           |                    |
| * Enabled addons:              |  0.073307 |           0.319567 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.073193 |           0.067911 |
| configured to use "minikube"   |           |                    |
|                                |  0.008625 |           0.008256 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [27.296141383000002 27.425198908 27.314033223]
Average time for minikube: 27.345124504666668

Times for Minikube (PR 8872): [28.118795371 26.725539343 28.292362939]
Average time for Minikube (PR 8872): 27.712232551

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8872) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.3 on Debian   |  0.069567 |           0.069143 |
|                           9.11 |           |                    |
| * Using the docker driver      |  0.109286 |           0.106237 |
| based on existing profile      |           |                    |
| * Starting control plane node  |  0.061903 |           0.058838 |
| minikube in cluster minikube   |           |                    |
| * Creating docker container    |  8.899348 |           8.522064 |
| (CPUs=2, Memory=3700MB) ...    |           |                    |
| * Preparing Kubernetes v1.18.3 | 17.183905 |          17.921820 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  0.922625 |           0.901288 |
| components...                  |           |                    |
| * Enabled addons:              |  0.027241 |           0.058774 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.061217 |           0.065337 |
| configured to use "minikube"   |           |                    |
|                                |  0.010033 |           0.008732 |
+--------------------------------+-----------+--------------------+

Signed-off-by: Pablo Caderno <[email protected]>
@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: [64.95724681200001 58.573613658 60.29624638]
Average time for minikube: 61.27570228333334

Times for Minikube (PR 8872): [61.958398914 61.311528751000004 60.71134397499999]
Average time for Minikube (PR 8872): 61.32709054666666

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8872) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.3 on Debian   |  0.056621 |           0.053536 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.024505 |           0.020355 |
| on existing profile            |           |                    |
| * Starting control plane node  |  0.003111 |           0.005665 |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 37.948806 |          39.073540 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.3 | 21.599309 |          20.344643 |
| on Docker 19.03.12 ...         |           |                    |
| * Verifying Kubernetes         |  1.397962 |           1.329132 |
| components...                  |           |                    |
| * Enabled addons:              |  0.162754 |           0.425761 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.074010 |           0.066184 |
| configured to use "minikube"   |           |                    |
|                                |  0.008624 |           0.008274 |
+--------------------------------+-----------+--------------------+

docker Driver
Times for minikube: [27.142014512999996 25.948460234000002 26.050070354]
Average time for minikube: 26.380181700333335

Times for Minikube (PR 8872): [40.594636910999995 27.827522944 26.274620815]
Average time for Minikube (PR 8872): 31.56559355666666

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 8872) |
+--------------------------------+-----------+--------------------+
| * minikube v1.12.3 on Debian   |  0.066619 |           0.066347 |
|                           9.11 |           |                    |
| * Using the docker driver      |  0.103015 |           0.103397 |
| based on existing profile      |           |                    |
| * Starting control plane node  |  0.057382 |           0.057527 |
| minikube in cluster minikube   |           |                    |
| * Creating docker container    |  8.483452 |           9.014562 |
| (CPUs=2, Memory=3700MB) ...    |           |                    |
| * Preparing Kubernetes v1.18.3 | 16.748976 |          17.234501 |
| on Docker 19.03.8 ...          |           |                    |
| * Verifying Kubernetes         |  0.846523 |           0.873206 |
| components...                  |           |                    |
| * Enabled addons:              |  0.002611 |           0.029127 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.063667 |           0.063753 |
| configured to use "minikube"   |           |                    |
|                                |  0.007936 |          11.239417 |
+--------------------------------+-----------+--------------------+

@kadern0
Copy link
Contributor Author

kadern0 commented Aug 22, 2020

@medyagh it seems to be working fine on mac too:

$ ./out/minikube start
😄  minikube v1.12.3 on Darwin 10.15.3
✨  Automatically selected the docker driver
❗  Requested memory allocation (1991MB) is less than the recommended minimum 2000MB. Kubernetes may crash unexpectedly.
❗  Your system has 16384MB memory but Docker has only 1991MB. For a better performance increase to at least 3GB.

	Docker for Desktop  > Settings > Resources > Memory


👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
💾  Downloading Kubernetes v1.18.3 preload ...
    > preloaded-images-k8s-v5-v1.18.3-docker-overlay2-amd64.tar.lz4: 510.91 MiB
🔥  Creating docker container (CPUs=2, Memory=1991MB) ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.8 ...
🔎  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"

❗  /usr/local/bin/kubectl is version 1.16.6-beta.0, which may be incompatible with Kubernetes 1.18.3.
💡  You can also use 'minikube kubectl -- get pods' to invoke a matching version
$ cd out/
$ cp minikube kubectl
$ ./kubectl
    > kubectl.sha256: 65 B / 65 B [--------------------------] 100.00% ? p/s 0s
    > kubectl: 47.84 MiB / 47.84 MiB [---------------] 100.00% 15.53 MiB p/s 3s
kubectl controls the Kubernetes cluster manager.

 Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/

Basic Commands (Beginner):
  create        Create a resource from a file or from stdin.
  expose        Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
  run           Run a particular image on the cluster
  set           Set specific features on objects

Basic Commands (Intermediate):
  explain       Documentation of resources
  get           Display one or many resources
  edit          Edit a resource on the server
  delete        Delete resources by filenames, stdin, resources and names, or by resources and label selector

Deploy Commands:
  rollout       Manage the rollout of a resource
  scale         Set a new size for a Deployment, ReplicaSet or Replication Controller
  autoscale     Auto-scale a Deployment, ReplicaSet, or ReplicationController

Cluster Management Commands:
  certificate   Modify certificate resources.
  cluster-info  Display cluster info
  top           Display Resource (CPU/Memory/Storage) usage.
  cordon        Mark node as unschedulable
  uncordon      Mark node as schedulable
  drain         Drain node in preparation for maintenance
  taint         Update the taints on one or more nodes

Troubleshooting and Debugging Commands:
  describe      Show details of a specific resource or group of resources
  logs          Print the logs for a container in a pod
  attach        Attach to a running container
  exec          Execute a command in a container
  port-forward  Forward one or more local ports to a pod
  proxy         Run a proxy to the Kubernetes API server
  cp            Copy files and directories to and from containers.
  auth          Inspect authorization

Advanced Commands:
  diff          Diff live version against would-be applied version
  apply         Apply a configuration to a resource by filename or stdin
  patch         Update field(s) of a resource using strategic merge patch
  replace       Replace a resource by filename or stdin
  wait          Experimental: Wait for a specific condition on one or many resources.
  convert       Convert config files between different API versions
  kustomize     Build a kustomization target from a directory or a remote url.

Settings Commands:
  label         Update the labels on a resource
  annotate      Update the annotations on a resource
  completion    Output shell completion code for the specified shell (bash or zsh)

Other Commands:
  alpha         Commands for features in alpha
  api-resources Print the supported API resources on the server
  api-versions  Print the supported API versions on the server, in the form of "group/version"
  config        Modify kubeconfig files
  plugin        Provides utilities for interacting with plugins.
  version       Print the client and server version information

Usage:
  kubectl [flags] [options]

Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).
$ ./kubectl get pods
No resources found in default namespace.
$ ls -lh
total 253448
-rwxr-xr-x  1 user  staff    62M 22 Aug 18:20 kubectl*
-rwxr-xr-x  1 user  staff    62M 22 Aug 18:11 minikube*
$ md5 minikube
MD5 (minikube) = ffe217daa9c1c3ed4306aeee942fb170
$ md5 kubectl
MD5 (kubectl) = ffe217daa9c1c3ed4306aeee942fb170

@minikube-pr-bot
Copy link

kvm2 Driver
Times for minikube: 85.7s 82.6s 83.3s
Average time for minikube: 83.8s

Times for Minikube (PR 8872): 64.2s 62.6s 62.2s
Average time for Minikube (PR 8872): 63.0s

Averages Time Per Log

+--------------------------------+----------+--------------------+
|              LOG               | MINIKUBE | MINIKUBE (PR 8872) |
+--------------------------------+----------+--------------------+
| * minikube v1.12.3 on Debian   | 0.1s     | 0.1s               |
|                           9.11 |          |                    |
| * Using the kvm2 driver based  | 0.0s     | 0.0s               |
| on user configuration          |          |                    |
| * Starting control plane node  | 0.0s     | 0.0s               |
| minikube in cluster minikube   |          |                    |
| * Creating kvm2 VM (CPUs=2,    | 39.9s    | 39.4s              |
| Memory=3700MB, Disk=20000MB)   |          |                    |
| ...                            |          |                    |
| * Preparing Kubernetes v1.19.0 | 41.9s    |                    |
| on Docker 19.03.12 ...         |          |                    |
| * Verifying Kubernetes         | 1.6s     | 1.5s               |
| components...                  |          |                    |
| * Enabled addons:              | 0.2s     | 0.2s               |
| default-storageclass,          |          |                    |
| storage-provisioner            |          |                    |
| * Done! kubectl is now         | 0.1s     | 0.1s               |
| configured to use "minikube"   |          |                    |
|                                | 0.0s     | 21.8s              |
+--------------------------------+----------+--------------------+

docker Driver
Times for minikube: 43.2s 42.2s 41.0s
Average time for minikube: 42.1s

Times for Minikube (PR 8872): 32.9s 28.1s 28.2s
Average time for Minikube (PR 8872): 29.7s

Averages Time Per Log

+--------------------------------+----------+--------------------+
|              LOG               | MINIKUBE | MINIKUBE (PR 8872) |
+--------------------------------+----------+--------------------+
| * minikube v1.12.3 on Debian   | 0.1s     | 0.1s               |
|                           9.11 |          |                    |
| * Using the docker driver      | 0.0s     | 0.1s               |
| based on user configuration    |          |                    |
|                                | 31.9s    | 0.9s               |
|                                |          |                    |
| * Starting control plane node  |          |                    |
| minikube in cluster minikube   |          |                    |
| * Creating docker container    |          |                    |
| (CPUs=2, Memory=3700MB) ...    |          |                    |
| * Preparing Kubernetes v1.19.0 |          |                    |
| on Docker 19.03.8 ...          |          |                    |
| * Verifying Kubernetes         |          |                    |
| components...                  |          |                    |
| * Enabled addons:              |          |                    |
| default-storageclass,          |          |                    |
| storage-provisioner            |          |                    |
| * Done! kubectl is now         |          |                    |
| configured to use "minikube"   |          |                    |
|                                |          |                    |
+--------------------------------+----------+--------------------+

@tstromberg tstromberg merged commit dc59514 into kubernetes:master Sep 2, 2020
@tstromberg tstromberg changed the title Running internal kubectl command when minikube is called as 'kubectl' Invoke appropriate kubectl binary if minikube binary is named 'kubectl' Sep 2, 2020
@tstromberg tstromberg changed the title Invoke appropriate kubectl binary if minikube binary is named 'kubectl' Invoke kubectl if minikube binary is named 'kubectl' Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants