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

Initial implementation of kubectl command #3646

Merged
merged 1 commit into from
May 2, 2019

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Feb 9, 2019

Some duplication, always using default k8s

For #3645

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 9, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Feb 15, 2019

The implementation here seems sound, but after reviewing our uses of kubectl, I'm left wondering if this command is worth the technical debt it incurs. I feel that if users want to use kubectl, they may as well install it properly so that they may use it for a non-minikube cluster.

Thoughts?

@afbjorklund
Copy link
Collaborator Author

As long as kubectl is just a Recommends in a .deb so that it gets automatically pulled with the sudo apt install minikube (which would of course also install needed drivers as Depends), then everything is fine...

But after putting the poor user through:
https://kubernetes.io/docs/tasks/tools/install-minikube/#linux

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
chmod +x minikube
sudo cp minikube /usr/local/bin && rm minikube

The last thing to do is making them do:
https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-using-curl

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

Where it "forgets" to use the checksums, and is prone to using the wrong version of kubectl. The only difference between this and "properly", seems to be the extra step of copying it along the $PATH ?


To be honest I am not sure why we require the user to have sudo rights ?
They would probably be just as well off, by copying them to ~/.local/bin

I've also seen at least a dozen different ways to do the above, with chown etc.
Even these two pages in the Kubernetes docs also vary, ever so slightly.

@afbjorklund
Copy link
Collaborator Author

This command can use the new machine.CacheBinary function instead, once #3737 is merged.

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@tstromberg
Copy link
Contributor

This seems ready to merge once we have positive test results.

@tstromberg
Copy link
Contributor

Please rebase and merge once ready. Thanks!

@afbjorklund
Copy link
Collaborator Author

Will wait for 1.1

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants