-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Automatically download missing kube binaries in kube-up/kube-down. #38730
Automatically download missing kube binaries in kube-up/kube-down. #38730
Conversation
$ tar xzf kubernetes.tar.gz
$ cd kubernetes
$ KUBERNETES_RELEASE_URL=file:///tmp/release-tars ./cluster/kube-up.sh
... Starting cluster in us-central1-b using provider gce
... calling verify-prereqs
... calling verify-kube-binaries
!!! kubectl appears to be broken or missing
!!! Cannot find kubernetes-server-linux-amd64.tar.gz
Required binaries appear to be missing. Do you wish to download them? [Y/n]
Kubernetes release: v1.6.0-alpha.0.2098+cbee65a6d2b969
Server: linux/amd64 (to override, set KUBERNETES_SERVER_ARCH)
Client: linux/amd64 (autodetected)
Will download kubernetes-server-linux-amd64.tar.gz from file:///tmp/release-tars/v1.6.0-alpha.0.2098+cbee65a6d2b969
Will download and extract kubernetes-client-linux-amd64.tar.gz from file:///tmp/release-tars/v1.6.0-alpha.0.2098+cbee65a6d2b969
Is this ok? [Y]/n
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 264M 100 264M 0 0 940M 0 --:--:-- --:--:-- --:--:-- 940M
md5sum(kubernetes-server-linux-amd64.tar.gz)=e64efb5461d4e62a87e349fcaadf7e56
sha1sum(kubernetes-server-linux-amd64.tar.gz)=e742eac127b46aba4ce4434a0b5af91a95f1884e
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 20.9M 100 20.9M 0 0 991M 0 --:--:-- --:--:-- --:--:-- 991M
md5sum(kubernetes-client-linux-amd64.tar.gz)=ddf2a4317e23dcbff5d6d38caca757fa
sha1sum(kubernetes-client-linux-amd64.tar.gz)=95fb61aa11d05a5322c2c159bf652333b64cc8c1
Extracting /tmp/k/kubernetes/client/kubernetes-client-linux-amd64.tar.gz into /tmp/k/kubernetes/platforms/linux/amd64
Add '/tmp/k/kubernetes/client/bin' to your PATH to use newly-installed binaries.
... calling kube-up
Your active configuration is: [default]
... |
If you want to test this fix yourself (linux/amd64 only): $ export KUBERNETES_RELEASE_URL=https://storage.googleapis.com/kubernetes-release-pull/ci/pull-kubernetes-e2e-gce
$ curl "${KUBERNETES_RELEASE_URL}/v1.6.0-alpha.0.2099+a51bc0dfda11bd/kubernetes.tar.gz" | tar xzf -
$ cd kubernetes
$ cluster/kube-up.sh |
Jenkins GCI GCE e2e failed for commit cbee65a. Full PR test history. The magic incantation to run this job again is |
@k8s-bot gci gce e2e test this |
Awesome. LGTM. /lgtm |
Automatic merge from submit-queue |
I realized this PR is probably release-note-worthy. |
@ixdy Agree -- release note is worthwhile here. |
Yes, @ixdy this would be useful. I was definitely confused by this otherwise! |
@arun-gupta there was supposed to be a more elaborate release note on the original PR, but a rogue space prevented it from being included. :( |
@ixdy no worries, glad we found this rather soon! |
Commit found in the "release-1.5" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
What this PR does / why we need it: some users extract
kubernetes.tar.gz
and then immediately callcluster/kube-up.sh
without first calling the newcluster/get-kube-binaries.sh
script. As a result, the cluster fails to start, but it's not immediately clear why binaries are missing.This PR streamlines this workflow by detecting this condition and prompting the user to download necessary binaries (using
cluster/get-kube-binaries.sh
).Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #38725Release note:
cc @arun-gupta @christian-posta