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
improve exit message when trying to pull Non-Existing Kubernetes Version #11627
Comments
I'd like to try and implement this |
/assign |
/assign @medyagh |
I think I just added some assertions to the backend, to avoid trying to run with strange numbers. So it needs to start with 1. if v.Major > 1 {
return nil, fmt.Errorf("version too new: %v", v)
}
if semver.MustParseRange("<1.12.0-alpha.0")(v) {
return nil, fmt.Errorf("version too old: %v", v)
} Kubeadm will just make something up, and hope for the best: $ kubeadm config images list --kubernetes-version=20.10.7
W0613 20:44:50.874013 628468 images.go:80] could not find officially supported version of etcd for Kubernetes v20.10.7, falling back to the nearest etcd version (3.2.24)
k8s.gcr.io/kube-apiserver:v20.10.7
k8s.gcr.io/kube-controller-manager:v20.10.7
k8s.gcr.io/kube-scheduler:v20.10.7
k8s.gcr.io/kube-proxy:v20.10.7
k8s.gcr.io/pause:3.4.1
k8s.gcr.io/etcd:3.2.24
k8s.gcr.io/coredns/coredns:v1.8.0
|
The error message for old releases is slightly more friendly:
The situation is not so good when trying a far future release:
|
Might have to add a new constant for this, the newest version that is supported with some similar version skew ?
If assuming the same 6 versions (v1.20.x -> v1.14.0), then it would be a warning with anything above v1.26.0 ? But I just hardcoded >= v2.0.0 as "too new", for now. Parsing available versions etc is a different feature ? |
Thank you for your input @afbjorklund . As I've already implemented what @medyagh suggested (fetching and parsing available versions), let's see what he thinks and we'll go from there. Also, feel free to look at my updated PR if you want. Thanks! |
Hardcoding future versions was not great idea anyway. In theory, minikube should continue to work also with those ? |
PR improves the failure scenario: Just need to make it possible to run offline too, where needed. |
I created a PR (#13354) to add simple solution for this issue. Please take a look. Thank you! |
I made a mistake and put in the wrong k8s version, we should have a more beautiful looking error, and ideally do not even try to create container when a non-existing k8s version is specified
The text was updated successfully, but these errors were encountered: