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

Download binaries from dl.k8s.io instead of GCS #15840

Merged
merged 1 commit into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/functional_verified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/arm64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- name: Docker Info
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- name: Docker Info
Expand Down Expand Up @@ -305,7 +305,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true

Expand Down Expand Up @@ -408,7 +408,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
Expand Down Expand Up @@ -507,7 +507,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- name: Docker Info
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- name: Docker Info
Expand Down Expand Up @@ -306,7 +306,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
# https://rootlesscontaine.rs/getting-started/common/cgroup2/
Expand Down Expand Up @@ -423,7 +423,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true

Expand Down Expand Up @@ -527,7 +527,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
Expand Down Expand Up @@ -627,7 +627,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/time-to-k8s-public-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
Expand Down
2 changes: 1 addition & 1 deletion deploy/prow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ RUN echo "Installing Packages ..." \
&& update-alternatives --set iptables /usr/sbin/iptables-legacy \
&& update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \
&& echo "Installing Kubectl ..." \
&& curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" \
&& curl -LO "https://dl.k8s.io/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& chmod +x ./kubectl \
&& cp kubectl /usr/local/bin
# copy in image utility scripts
Expand Down
2 changes: 1 addition & 1 deletion hack/jenkins/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $env:MINIKUBE_SUPPRESS_DOCKER_PERFORMANCE="true"
$GoVersion = "1.20"

# Docker's kubectl breaks things, and comes earlier in the path than the regular kubectl. So download the expected kubectl and replace Docker's version.
$KubeVersion = (Invoke-WebRequest -Uri 'https://storage.googleapis.com/kubernetes-release/release/stable.txt' -UseBasicParsing).Content
$KubeVersion = (Invoke-WebRequest -Uri 'https://dl.k8s.io/release/stable.txt' -UseBasicParsing).Content
(New-Object Net.WebClient).DownloadFile("https://dl.k8s.io/release/$KubeVersion/bin/windows/amd64/kubectl.exe", "C:\Program Files\Docker\Docker\resources\bin\kubectl.exe")

# Setup the cleanup and reboot cron
Expand Down
2 changes: 1 addition & 1 deletion hack/jenkins/installers/check_install_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ rm get-docker.sh
sudo adduser jenkins docker || true

echo "Installing latest kubectl"
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${ARCH}/kubectl"
curl -LO "https://dl.k8s.io/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${ARCH}/kubectl"
sudo install ./kubectl /usr/local/bin/kubectl
2 changes: 1 addition & 1 deletion hack/jenkins/linux_integration_tests_none.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export KUBECONFIG="/root/.kube/config"

if ! kubeadm &>/dev/null; then
echo "WARNING: kubeadm is not installed. will try to install."
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubeadm"
curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubeadm"
sudo install kubeadm /usr/local/bin/kubeadm
fi
# "none" driver specific cleanup from previous runs.
Expand Down
2 changes: 1 addition & 1 deletion hack/update/kubeadm_constants/update_kubeadm_constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
const (
// default context timeout
cxTimeout = 5 * time.Minute
kubeadmReleaseURL = "https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/amd64/kubeadm"
kubeadmReleaseURL = "https://dl.k8s.io/release/%s/bin/linux/amd64/kubeadm"
kubeadmBinaryName = "kubeadm-linux-amd64-%s"
minikubeConstantsFilePath = "pkg/minikube/constants/constants_kubeadm_images.go"
kubeadmImagesTemplate = `
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/download/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

// DefaultKubeBinariesURL returns a URL to kube binaries
func DefaultKubeBinariesURL() string {
return fmt.Sprintf("https://%s/kubernetes-release/release", downloadHost)
return fmt.Sprintf("https://%s%s/release", releaseHost, releasePath)
}

// binaryWithChecksumURL gets the location of a Kubernetes binary
Expand Down
6 changes: 6 additions & 0 deletions pkg/minikube/download/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,17 @@ var (

aliyunMirror = "kubernetes.oss-cn-hangzhou.aliyuncs.com"
downloadHost = "storage.googleapis.com"

releaseHost = "dl.k8s.io"
releasePath = ""
)

// SetAliyunMirror set the download host for Aliyun mirror
func SetAliyunMirror() {
downloadHost = aliyunMirror

releaseHost = downloadHost
releasePath = "/kubernetes-release"
}

// CreateDstDownloadMock is the default mock implementation of download.
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/reason/match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MachineWrap,
* Temporary download error: Get https://storage.googleapis.com/minikube/iso/minikube-v0.35.0.iso: dial tcp 216.58.207.144:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.`},
{4107, "darwin", "PR_VBOX_BLOCKED", "Result Code: NS_ERROR (0x80004005)"},
{4302, "", "K8S_APISERVER_TIMEOUT", "apiserver: timed out waiting for the condition"},
{4252, "", "INET_TLS_OVERSIZED", "Failed to update cluster: downloading binaries: downloading kubeadm: Error downloading kubeadm v1.14.1: failed to download: failed to download to temp file: download failed: 5 error(s) occurred:\n\nTemporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.14.1/bin/linux/amd64/kubeadm: proxyconnect tcp: tls: oversized record received with length 20527"},
{4252, "", "INET_TLS_OVERSIZED", "Failed to update cluster: downloading binaries: downloading kubeadm: Error downloading kubeadm v1.14.1: failed to download: failed to download to temp file: download failed: 5 error(s) occurred:\n\nTemporary download error: Get https://dl.k8s.io/release/v1.14.1/bin/linux/amd64/kubeadm: proxyconnect tcp: tls: oversized record received with length 20527"},
{4222, "", "IF_VBOX_NOT_VISIBLE", "Unable to start VM: create: creating: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is supposed to fix this issue"},
{6014, "linux", "K8S_APISERVER_MISSING", "Error restarting cluster: waiting for apiserver: apiserver process never appeared"},
{5836, "", "SVC_OPEN_NOT_FOUND", `Error opening service: Service newservice was not found in "unknown" namespace. You may select another namespace by using 'minikube service newservice -n : Temporary Error: Error getting service newservice: services "newservice" not found`},
Expand Down
4 changes: 2 additions & 2 deletions site/content/en/docs/tutorials/continuous_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ curl -LO \
https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
&& install minikube-linux-amd64 /tmp/

kv=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
kv=$(curl -sSL https://dl.k8s.io/release/stable.txt)
curl -LO \
https://storage.googleapis.com/kubernetes-release/release/$kv/bin/linux/amd64/kubectl \
https://dl.k8s.io/$kv/bin/linux/amd64/kubectl \
&& install kubectl /tmp/

/tmp/minikube-linux-amd64 config set WantUpdateNotification false
Expand Down