Skip to content

Commit dbab274

Browse files
authored
Merge pull request #21490 from nirs/update-k8s-versions
Update oldest supported Kubernetes versions
2 parents d6ec40c + ce0ab00 commit dbab274

File tree

9 files changed

+24
-21
lines changed

9 files changed

+24
-21
lines changed

pkg/minikube/constants/constants.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ const (
3939
// NOTE: You may need to update coreDNS & etcd versions in pkg/minikube/bootstrapper/images/images.go
4040
NewestKubernetesVersion = "v1.34.0"
4141
// OldestKubernetesVersion is the oldest Kubernetes version to test against
42-
OldestKubernetesVersion = "v1.20.0"
42+
// TODO: upodate to 6 releases before from DefaultKubernetesVersion
43+
OldestKubernetesVersion = "v1.28.0"
44+
4345
// NoKubernetesVersion is the version used when users does NOT want to install kubernetes
4446
NoKubernetesVersion = "v0.0.0"
4547

site/content/en/docs/drivers/none.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ As Kubernetes has full access to both your filesystem as well as your docker ima
6868
* Many `minikube` commands are not supported, such as: `dashboard`, `mount`, `ssh`
6969
* minikube with the `none` driver has a confusing permissions model, as some commands need to be run as root ("start"), and others by a regular user ("dashboard")
7070
* CoreDNS detects resolver loop, goes into CrashLoopBackOff - [#3511](https://github.com/kubernetes/minikube/issues/3511)
71-
* Some versions of Linux have a version of docker that is newer than what Kubernetes expects. To overwrite this, run minikube with the following parameters: `minikube start --driver=none --kubernetes-version v1.11.8 --extra-config kubeadm.ignore-preflight-errors=SystemVerification`
71+
* Some versions of Linux have a version of docker that is newer than what Kubernetes expects. To overwrite this, run minikube with the following parameters: `minikube start --driver=none --kubernetes-version v1.34.0 --extra-config kubeadm.ignore-preflight-errors=SystemVerification`
7272

7373
* [Full list of open 'none' driver issues](https://github.com/kubernetes/minikube/labels/co%2Fnone-driver)
7474

site/content/en/docs/faq/_index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can create a Kubernetes cluster with any version you desire using `--kuberne
1515
Example:
1616

1717
```bash
18-
minikube start --kubernetes-version=v1.15.0
18+
minikube start --kubernetes-version=v1.34.0
1919
```
2020

2121
## How can I create more than one cluster with minikube?
@@ -40,7 +40,7 @@ Yes! If you want to use minikube only as a Docker Desktop replacement without st
4040
minikube start --container-runtime=docker --no-kubernetes
4141
```
4242

43-
Alternatively, if you want to temporarily turn off Kubernetes, you can pause and later unpause Kubernetes
43+
Alternatively, if you want to temporarily turn off Kubernetes, you can pause and later unpause Kubernetes
4444
```
4545
minikube pause
4646
```
@@ -65,7 +65,7 @@ minikube start --force-systemd=true
6565

6666
## How can I run minikube with the Docker driver if I have an existing cluster with a VM driver?
6767

68-
First please ensure your Docker service is running. Then you need to either:
68+
First please ensure your Docker service is running. Then you need to either:
6969

7070
(a) Delete the existing cluster and create a new one
7171

@@ -77,7 +77,7 @@ minikube start --driver=docker
7777
Alternatively, (b) Create a second cluster with a different profile name:
7878

7979
```bash
80-
minikube start -p p1 --driver=docker
80+
minikube start -p p1 --driver=docker
8181
```
8282

8383
## Does minikube support IPv6?
@@ -88,7 +88,7 @@ minikube currently doesn't support IPv6. However, it is on the [roadmap]({{< ref
8888

8989
The easiest approach is to use the `docker` driver, as the backend service always runs as `root`.
9090

91-
`none` users may want to try `CHANGE_MINIKUBE_NONE_USER=true`, where kubectl and such will work without `sudo`. See [environment variables]({{< ref "/docs/handbook/config.md#environment-variables" >}}) for more details.
91+
`none` users may want to try `CHANGE_MINIKUBE_NONE_USER=true`, where kubectl and such will work without `sudo`. See [environment variables]({{< ref "/docs/handbook/config.md#environment-variables" >}}) for more details.
9292

9393
Alternatively, you can configure `sudo` to never prompt for commands issued by minikube.
9494

@@ -178,15 +178,15 @@ This is not recommended, but for some users who are willing to accept potential
178178

179179
After executing `minikube start`, minikube will try to pulling images from `gcr.io` or Docker Hub. However, it has been confirmed that Chinese (mainland) users may not have access to `gcr.io` or Docker Hub. So in China mainland, it is very likely that `minikube start` will fail.
180180

181-
For Chinese users, the reason is that China mainland government has set up GFW firewall to block any access to `gcr.io` or Docker Hub from China mainland.
181+
For Chinese users, the reason is that China mainland government has set up GFW firewall to block any access to `gcr.io` or Docker Hub from China mainland.
182182

183183
Minikube is an open community and we are always willing to help users from any corner of the world to use our open-source software, and provide possible assistance when possible. Here are 3 possible ways to resolve the blockade.
184184

185-
1. Use `minikube start --image-mirror-country='cn'` instead. Aliyun (a Chinese corporation) provides a mirror repository (`registry.cn-hangzhou.aliyuncs.com/google_containers`) for those images, to which Chinese users have access. By using `--image-mirror-country='cn'` flag, minikube will try to pull the image from Aliyun mirror site as first priority. <br/><br/> *Note: when a new image is published on gcr.io, it may take several days for the image to be synchronized to Aliyun mirror repo. However, minikube will always try to pull the newest image by default, which will cause a failure of pulling image. Under this circumstance, you HAVE TO use `--kubernetes-version` flag AS WELL to tell minikube to use an older version image which is available on Aliyun repo.* <br/><br/> *For example, `minikube start --image-mirror-country='cn' --kubernetes-version=v1.23.8` will tell minikube to pull v1.23.8 k8s image from Aliyun.*
185+
1. Use `minikube start --image-mirror-country='cn'` instead. Aliyun (a Chinese corporation) provides a mirror repository (`registry.cn-hangzhou.aliyuncs.com/google_containers`) for those images, to which Chinese users have access. By using `--image-mirror-country='cn'` flag, minikube will try to pull the image from Aliyun mirror site as first priority. <br/><br/> *Note: when a new image is published on gcr.io, it may take several days for the image to be synchronized to Aliyun mirror repo. However, minikube will always try to pull the newest image by default, which will cause a failure of pulling image. Under this circumstance, you HAVE TO use `--kubernetes-version` flag AS WELL to tell minikube to use an older version image which is available on Aliyun repo.* <br/><br/> *For example, `minikube start --image-mirror-country='cn' --kubernetes-version=v1.34.0` will tell minikube to pull v1.34.0 k8s image from Aliyun.*
186186

187-
2. If you have a private mirror repository provided by your own cloud provider, you can specify that via `--image-repository` flag. For example, using `minikube start --image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers'` will tell minikube to try to pull images from `registry.cn-hangzhou.aliyuncs.com/google_containers` mirror repository as first priority.
188-
189-
3. Use a proxy server/VPN, if you have one. <br/> *Note: please obey the local laws. In some area, using an unauthorized proxy server/VPN is ILLEGAL*
187+
2. If you have a private mirror repository provided by your own cloud provider, you can specify that via `--image-repository` flag. For example, using `minikube start --image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers'` will tell minikube to try to pull images from `registry.cn-hangzhou.aliyuncs.com/google_containers` mirror repository as first priority.
188+
189+
3. Use a proxy server/VPN, if you have one. <br/> *Note: please obey the local laws. In some area, using an unauthorized proxy server/VPN is ILLEGAL*
190190

191191
## How do I install containernetworking-plugins for none driver?
192192

site/content/en/docs/handbook/config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Configuration"
33
weight: 4
44
description: >
5-
Configuring your cluster
5+
Configuring your cluster
66
aliases:
77
- /docs/reference/environment_variables/
88
- /docs/reference/configuration/kubernetes/
@@ -50,9 +50,9 @@ This flag is repeated, so you can pass it several times with several different v
5050
By default, minikube installs the latest stable version of Kubernetes that was available at the time of the minikube release. You may select a different Kubernetes release by using the `--kubernetes-version` flag, for example:
5151

5252
```shell
53-
minikube start --kubernetes-version=v1.11.10
53+
minikube start --kubernetes-version=v1.34.0
5454
```
55-
55+
5656
minikube follows the [Kubernetes Version and Version Skew Support Policy](https://kubernetes.io/docs/setup/version-skew-policy/), so we guarantee support for the latest build for the last 3 minor Kubernetes releases. When practical, minikube aims to support older releases as well so that users can emulate legacy environments.
5757

5858
For up to date information on supported versions, see `OldestKubernetesVersion` and `NewestKubernetesVersion` in [constants.go](https://github.com/kubernetes/minikube/blob/master/pkg/minikube/constants/constants.go)

site/content/en/docs/start/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ minikube addons list
758758
Create a second cluster running an older Kubernetes release:
759759

760760
```shell
761-
minikube start -p aged --kubernetes-version=v1.16.1
761+
minikube start -p aged --kubernetes-version=v1.34.0
762762
```
763763

764764
Delete all of the minikube clusters:

site/content/en/docs/tutorials/volume_snapshots_and_csi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This tutorial explains how to set up the CSI Hostpath Driver in minikube and cre
1414
## Prerequisites
1515

1616
- latest version of minikube
17-
- kubernetes v1.20 or later
17+
- kubernetes v1.28 or later
1818

1919
## What you’ll need
2020

test/integration/no_kubernetes_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import (
2525
"os/exec"
2626
"strings"
2727
"testing"
28+
29+
"k8s.io/minikube/pkg/minikube/constants"
2830
)
2931

3032
// TestNoKubernetes tests starting minikube without Kubernetes,
@@ -79,7 +81,7 @@ func validateStartNoK8sWithVersion(ctx context.Context, t *testing.T, profile st
7981
defer PostMortemLogs(t, profile)
8082

8183
// docs: start minikube with no kubernetes.
82-
args := append([]string{"start", "-p", profile, "--no-kubernetes", "--kubernetes-version=1.20"}, StartArgs()...)
84+
args := append([]string{"start", "-p", profile, "--no-kubernetes", "--kubernetes-version=" + constants.OldestKubernetesVersion}, StartArgs()...)
8385
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
8486
if err == nil {
8587
t.Fatalf("expected an error but none was thrown with args: %q", rr.Command())

test/integration/preload_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ func TestPreload(t *testing.T) {
3838

3939
startArgs := []string{"start", "-p", profile, "--memory=3072", "--alsologtostderr", "--wait=true", "--preload=false"}
4040
startArgs = append(startArgs, StartArgs()...)
41-
k8sVersion := "v1.24.4"
42-
startArgs = append(startArgs, fmt.Sprintf("--kubernetes-version=%s", k8sVersion))
41+
startArgs = append(startArgs, fmt.Sprintf("--kubernetes-version=%s", legacyVersion()))
4342

4443
rr, err := Run(t, exec.CommandContext(ctx, Target(), startArgs...))
4544
if err != nil {

test/integration/version_upgrade_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func legacyVersion() string {
6666
// Should be a version from the last 6 months
6767
// note: Test*BinaryUpgrade require minikube v1.22+ to satisfy newer containerd config structure
6868
// note: TestMissingContainerUpgrade requires minikube v1.26.0+ where we copy over initial containerd config in kicbase via deploy/kicbase/Dockerfile
69-
version := "v1.26.0" // 2022-06-23
69+
version := "v1.32.0" // Dec 11, 2024
7070
return version
7171
}
7272

0 commit comments

Comments
 (0)