diff --git a/docs/testing-pre-releases.md b/docs/testing-pre-releases.md index c9b81663..851531d6 100644 --- a/docs/testing-pre-releases.md +++ b/docs/testing-pre-releases.md @@ -60,8 +60,8 @@ The table below summarize the current state: | | .deb or .rpm | kubeadm binary | control plane | |-------------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------| -| **GA release** | from .deb or .rpm repository | from [github release page](https://github.com/kubernetes/kubernetes/releases) or from `gs://kubernetes-release/release/` GCS bucket | from `k8s.gcr.io` container registry or from [github release page](https://github.com/kubernetes/kubernetes/releases) | -| **alpha/beta release*** | not available. | from [github release page](https://github.com/kubernetes/kubernetes/releases) or from `gs://kubernetes-release/release/` GCS bucket | from `k8s.gcr.io` container registry or from [github release page](https://github.com/kubernetes/kubernetes/releases) | +| **GA release** | from .deb or .rpm repository | from [github release page](https://github.com/kubernetes/kubernetes/releases) or from `https://dl.k8s.io/` release bucket | from `k8s.gcr.io` container registry or from [github release page](https://github.com/kubernetes/kubernetes/releases) | +| **alpha/beta release*** | not available. | from [github release page](https://github.com/kubernetes/kubernetes/releases) or from `https://dl.k8s.io/` release bucket | from `k8s.gcr.io` container registry or from [github release page](https://github.com/kubernetes/kubernetes/releases) | | **CI/CD release*** | not available. | from `gs://k8s-release-dev/ci/` GCS bucket (built every merge) | from `gcr.io/k8s-staging-ci-images` container registry (built every few hours, not by PR) | [*] for alpha/beta and CI/CD currently it is not possible to have exact version number consistency for all the @@ -94,29 +94,16 @@ apt-get install = yum install - ``` -### Getting kubeadm binaries from a GCS bucket +### Getting kubeadm binaries from a release bucket -Pre-compiled GA, alpha/beta versions of kubeadm binary are deployed into `gs://kubernetes-release/release/` GCS bucket, +Pre-compiled GA, alpha/beta versions of kubeadm binary are deployed into `https://dl.k8s.io/release/` release bucket, while CI/CD versions are deployed into `gs://k8s-release-dev/ci/` bucket. -To explore versions available in Google Storage buckets use: - -```bash -gsutil ls gs://{bucket-name}{filter} - -# e.g. search all GA and alpha/beta v1.10 releases -gsutil ls -d gs://kubernetes-release/release/v1.10* -``` - -As alternative, you can browse GCS buckets using or - (only for `gs://kubernetes-release/release/`). +To explore Kubernetes versions available to use, visit the [github release page](https://github.com/kubernetes/kubernetes/releases). To retrieve a pre-compiled version of kubeadm binary use: ```bash -gsutil cp gs://{bucket-name}/{release}/bin/linux/amd64/kubeadm . - -# or, only for releases in gs://kubernetes-release/release/ curl -L https://dl.k8s.io/release/{release}/bin/linux/amd64/kubeadm && chown +x kubeadm ``` @@ -167,8 +154,8 @@ Run `cluster/get-kube-binaries.sh` to download the tarball with server binaries. > Inside release notes, usually there is a direct link for getting server binaries directly -> `cluster/get-kube-binaries.sh` retrieves server binaries from `gs://kubernetes-release/release/{release}` - GCS bucket; you can use `gsutil` to get server binaries directly. +> `cluster/get-kube-binaries.sh` retrieves server binaries from `https://dl.k8s.io/release/{release}` + Release bucket; you can use `curl` to get server binaries directly. Both Kubeadm binaries and docker images are available in `/server/bin` folder of `kubernetes-server-linux-amd64.tar.gz` diff --git a/kinder/pkg/extract/extract.go b/kinder/pkg/extract/extract.go index 50e2329a..ea954017 100644 --- a/kinder/pkg/extract/extract.go +++ b/kinder/pkg/extract/extract.go @@ -45,7 +45,7 @@ import ( const ( ciBuildRepository = "https://storage.googleapis.com/k8s-release-dev/ci" - releaseBuildURepository = "https://storage.googleapis.com/kubernetes-release/release" + releaseBuildURepository = "https://dl.k8s.io/release" kubeadmBinary = "kubeadm" kubeletBinary = "kubelet" @@ -509,9 +509,18 @@ var httpGetBackoff = wait.Backoff{ func httpGet(uri string) (int64, io.ReadCloser, error) { var lastError error var resp *http.Response + + // Create a custom http.Client with redirect behavior + client := &http.Client{ + CheckRedirect: func(req *http.Request, via []*http.Request) error { + // Allow redirects + return nil + }, + } + err := wait.ExponentialBackoff(httpGetBackoff, func() (bool, error) { var err error - resp, err = http.Get(uri) + resp, err = client.Get(uri) if err != nil { log.Warnf("HTTP GET %s failed. Retry in few seconds", uri) lastError = errors.Wrapf(err, "HTTP GET %s failed", uri) diff --git a/tests/e2e/manifests/verify_manifest_lists.go b/tests/e2e/manifests/verify_manifest_lists.go index b44e0eb0..4484f415 100644 --- a/tests/e2e/manifests/verify_manifest_lists.go +++ b/tests/e2e/manifests/verify_manifest_lists.go @@ -223,6 +223,10 @@ func getFromURLTimeoutSize(url string, timeout int, sizeOnly bool) (string, int, t := time.Duration(time.Duration(timeout) * time.Second) client := http.Client{ Timeout: t, + CheckRedirect: func(req *http.Request, via []*http.Request) error { + // Allow redirects + return nil + }, } req, err := http.NewRequest("GET", url, nil) @@ -641,7 +645,7 @@ func filterVersions(versions VersionList) (VersionList, error) { minEstimated = version.MustParseGeneric(semVersion) // else get the last version from the previous Major release and apply the skew. } else { - url := fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/release/stable-%d.txt", minEstimated.Major()-1) + url := fmt.Sprintf("https://dl.k8s.io/release/stable-%d.txt", minEstimated.Major()-1) verFromURL, _, err := getFromURL(url) if err != nil { return versions, err