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

Add automatic download of kubectl #3645

Closed
afbjorklund opened this issue Feb 9, 2019 · 5 comments
Closed

Add automatic download of kubectl #3645

afbjorklund opened this issue Feb 9, 2019 · 5 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. r/2019q2 Issue was last reviewed 2019q2

Comments

@afbjorklund
Copy link
Collaborator

Currently we are pushing the install of kubectl to the user, with varying results (and long docs).

========================================
kubectl could not be found on your path. kubectl is a requirement for using minikube
To install kubectl, please run the following:

curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl && chmod +x kubectl && sudo cp kubectl /usr/local/bin/ && rm kubectl

To disable this message, run the following:

minikube config set WantKubectlDownloadMsg false
========================================

It would be more user-friendly to offer a wrapper to download and start the proper os/arch binary:

$ minikube kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-01T20:08:12Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-01T20:00:57Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

This also picks the right version (eventually), and offers to use more than one version.

If the user prefers to install and use their own kubectl, they just avoid this command...

@afbjorklund
Copy link
Collaborator Author

@tstromberg

@tstromberg tstromberg added kind/feature Categorizes issue or PR as related to a new feature. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Feb 11, 2019
@afbjorklund
Copy link
Collaborator Author

Note that I didn't have to do anything above, just wait a bit - while the kubectldownload happened.

i.e. I didn't have "kubectl" installed anywhere when I ran the command, yet it completed successfully.

@RA489
Copy link

RA489 commented Feb 18, 2019

@afbjorklund Is it still open ? if yes i would like to help.

@afbjorklund
Copy link
Collaborator Author

@RA489 : I want to make it download the current kubernetes version (instead of the default), but other than that I think #3646 is more or less what is needed ? Perhaps clean up the duplicated code a bit, test on Win.

@afbjorklund
Copy link
Collaborator Author

Updated the implementation, now it has some better download information and exit code...
Also respecting the current profile kubernetes version (if any) and removed code duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. r/2019q2 Issue was last reviewed 2019q2
Projects
None yet
Development

No branches or pull requests

3 participants