{"record":{"id":"9462b40e8db81208","repo":"kubernetes/kops","slug":"kubernetes-upgrade-is-required","errorCode":null,"errorMessage":"kubernetes upgrade is required","messagePattern":"kubernetes upgrade is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"upup/pkg/fi/cloudup/apply_cluster.go","lineNumber":1018,"sourceCode":"\t\t\t\tfmt.Printf(\"(you can bypass this check by exporting KOPS_RUN_TOO_NEW_VERSION)\\n\")\n\t\t\t}\n\t\t\tfmt.Printf(\"\\n\")\n\t\t\tfmt.Printf(\"%s\\n\", starline)\n\t\t\tfmt.Printf(\"\\n\")\n\t\t\tif !bypassCheck {\n\t\t\t\treturn fmt.Errorf(\"kops upgrade is required\")\n\t\t\t}\n\t\t}\n\t}\n\n\tif !util.IsKubernetesGTE(OldestSupportedKubernetesVersion, *parsed) {\n\t\tfmt.Printf(\"This version of Kubernetes is no longer supported; upgrading Kubernetes is required\\n\")\n\t\tfmt.Printf(\"\\n\")\n\t\tfmt.Printf(\"More information: %s\\n\", buildPermalink(\"upgrade_k8s\", OldestRecommendedKubernetesVersion))\n\t\tfmt.Printf(\"\\n\")\n\t\tfmt.Printf(\"%s\\n\", starline)\n\t\tfmt.Printf(\"\\n\")\n\t\treturn fmt.Errorf(\"kubernetes upgrade is required\")\n\t}\n\tif !util.IsKubernetesGTE(OldestRecommendedKubernetesVersion, *parsed) && !c.GetAssets {\n\t\tfmt.Printf(\"\\n\")\n\t\tfmt.Printf(\"%s\\n\", starline)\n\t\tfmt.Printf(\"\\n\")\n\t\tfmt.Printf(\"Kops support for this Kubernetes version is deprecated and will be removed in a future release.\\n\")\n\t\tfmt.Printf(\"\\n\")\n\t\tfmt.Printf(\"Upgrading Kubernetes is recommended\\n\")\n\t\tfmt.Printf(\"More information: %s\\n\", buildPermalink(\"upgrade_k8s\", OldestRecommendedKubernetesVersion))\n\t\tfmt.Printf(\"\\n\")\n\t\tfmt.Printf(\"%s\\n\", starline)\n\t\tfmt.Printf(\"\\n\")\n\n\t}\n\n\t// TODO: make util.ParseKubernetesVersion not return a pointer\n\tkubernetesVersion := *parsed\n","sourceCodeStart":1000,"sourceCodeEnd":1036,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/apply_cluster.go#L1000-L1036","documentation":"validateKubernetesVersion hard-fails when the cluster's spec.kubernetesVersion is OLDER than OldestSupportedKubernetesVersion — that Kubernetes version is no longer supported by kops, so the apply is refused with 'kubernetes upgrade is required'. Unlike the channel-based checks, there is no env bypass for this branch.","triggerScenarios":"Applying a cluster whose spec.kubernetesVersion is below the OldestSupportedKubernetesVersion constant of the running kops binary (e.g. kops 1.30+ applying a cluster still on Kubernetes 1.24).","commonSituations":"Long-lived clusters left un-upgraded for many releases; teams skipping required `kops upgrade cluster` runs; forks pinned to deprecated Kubernetes versions; resuming kops maintenance after a long gap.","solutions":["Upgrade the cluster: kops upgrade cluster mycluster.example.com --yes (may need to step through intermediate versions)","Set spec.kubernetesVersion to at least OldestSupportedKubernetesVersion, then apply","Plan an in-place upgrade path: bump one minor at a time, running node rolling-updates between steps","Read the permalink printed above the error (upgrade_k8s) for supported-version guidance"],"exampleFix":"// before\nspec:\n  kubernetesVersion: 1.24.17\n// after\nkops upgrade cluster mycluster.example.com --yes\n# resulting spec\nspec:\n  kubernetesVersion: 1.29.4","handlingStrategy":"validation","validationCode":"if !isK8sGTE(OldestSupportedKubernetesVersion, cluster.Spec.KubernetesVersion) {\n\treturn fmt.Errorf(\"kubernetesVersion %s is below %s; run kops upgrade cluster first\",\n\t\tcluster.Spec.KubernetesVersion, OldestSupportedKubernetesVersion)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run kops upgrade cluster regularly; never let clusters fall below the supported floor","Upgrade one Kubernetes minor at a time with rolling updates between steps","Track kops release notes for upcoming version retirements","Automate version-compliance checks on cluster specs in CI"],"tags":["version-check","upgrade","kubernetes","eol"],"backgroundTag":"kubernetes-version-eol","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}