diff --git a/.github/workflows/functional_verified.yml b/.github/workflows/functional_verified.yml index 3a2147cf86d3..df9cba836d8d 100644 --- a/.github/workflows/functional_verified.yml +++ b/.github/workflows/functional_verified.yml @@ -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 diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 038542a5b7e0..660e5403a041 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 321d8072d860..83d5f8981301 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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 @@ -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 @@ -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/ @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/time-to-k8s-public-chart.yml b/.github/workflows/time-to-k8s-public-chart.yml index 4d74088c29ae..c18bfb652e3a 100644 --- a/.github/workflows/time-to-k8s-public-chart.yml +++ b/.github/workflows/time-to-k8s-public-chart.yml @@ -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 diff --git a/deploy/prow/Dockerfile b/deploy/prow/Dockerfile index 78a3a1662151..9b95ad8d4d4d 100644 --- a/deploy/prow/Dockerfile +++ b/deploy/prow/Dockerfile @@ -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 diff --git a/hack/jenkins/common.ps1 b/hack/jenkins/common.ps1 index cdf368a9b5a2..e8518344dc7c 100644 --- a/hack/jenkins/common.ps1 +++ b/hack/jenkins/common.ps1 @@ -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 diff --git a/hack/jenkins/installers/check_install_docker.sh b/hack/jenkins/installers/check_install_docker.sh index 23acba7304ee..1e1c3618d7be 100755 --- a/hack/jenkins/installers/check_install_docker.sh +++ b/hack/jenkins/installers/check_install_docker.sh @@ -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 diff --git a/hack/jenkins/linux_integration_tests_none.sh b/hack/jenkins/linux_integration_tests_none.sh index 4c36e7faa871..9dcbfd4c3110 100755 --- a/hack/jenkins/linux_integration_tests_none.sh +++ b/hack/jenkins/linux_integration_tests_none.sh @@ -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. diff --git a/hack/update/kubeadm_constants/update_kubeadm_constants.go b/hack/update/kubeadm_constants/update_kubeadm_constants.go index cadb7fdba0bb..46e08d0cd5f8 100644 --- a/hack/update/kubeadm_constants/update_kubeadm_constants.go +++ b/hack/update/kubeadm_constants/update_kubeadm_constants.go @@ -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 = ` diff --git a/pkg/minikube/download/binary.go b/pkg/minikube/download/binary.go index 95f13816f1ea..21b3edd5dabb 100644 --- a/pkg/minikube/download/binary.go +++ b/pkg/minikube/download/binary.go @@ -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 diff --git a/pkg/minikube/download/download.go b/pkg/minikube/download/download.go index c72690538318..93906d641c17 100644 --- a/pkg/minikube/download/download.go +++ b/pkg/minikube/download/download.go @@ -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. diff --git a/pkg/minikube/reason/match_test.go b/pkg/minikube/reason/match_test.go index 72c19dd984e3..adc1cec5bb3e 100644 --- a/pkg/minikube/reason/match_test.go +++ b/pkg/minikube/reason/match_test.go @@ -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`}, diff --git a/site/content/en/docs/tutorials/continuous_integration.md b/site/content/en/docs/tutorials/continuous_integration.md index 9b3498466dfa..6788af3b70f0 100644 --- a/site/content/en/docs/tutorials/continuous_integration.md +++ b/site/content/en/docs/tutorials/continuous_integration.md @@ -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