Skip to content
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

Update kubeadm api version from v1beta1 to v1beta2 #6106

Closed
Colstuwjx opened this issue Dec 17, 2019 · 4 comments · Fixed by #6150
Closed

Update kubeadm api version from v1beta1 to v1beta2 #6106

Colstuwjx opened this issue Dec 17, 2019 · 4 comments · Fixed by #6150
Assignees
Labels
area/kubernetes-versions Improving support for versions of Kubernetes good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@Colstuwjx
Copy link

The exact command to reproduce the issue:
this issue was part of #6103, and the exact command was /bin/bash -c \"sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm config images pull --config /var/tmp/minikube/kubeadm.yaml\"

The full output of the command that failed:

...
🚜 拉取镜像 ...
❌ 无法拉取映像,有可能是正常状况:running cmd: "/bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm config images pull --config /var/tmp/minikube/kubeadm.yaml"": /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm config images pull --config /var/tmp/minikube/kubeadm.yaml": Process exited with status 1
stdout:

stderr:
W1217 08:28:08.405830 2817 common.go:77] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta1". Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version.
W1217 08:28:08.406353 2817 common.go:77] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta1". Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version.
W1217 08:28:08.407869 2817 validation.go:28] Cannot validate kube-proxy config - no validator is available
W1217 08:28:08.407887 2817 validation.go:28] Cannot validate kubelet config - no validator is available
failed to pull image "k8s.gcr.io/kube-apiserver:v1.17.0": output: Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp: lookup k8s.gcr.io on 10.0.2.3:53: no such host
, error: exit status 1
To see the stack trace of this error execute with --v=5 or higher
...

The output of the minikube logs command:

The operating system version: MacOS mojave

@Colstuwjx
Copy link
Author

According to the output prompted, we may need to run kubeadm config migrate --old-config old.yaml --new-config new.yaml', and using the new configuration spec for generating /var/tmp/minikube/kubeadm.yaml.

@tstromberg tstromberg changed the title kubeadm api version may need to update from v1beta1 to v1beta2 Update kubeadm api version from v1beta1 to v1beta2 Dec 17, 2019
@tstromberg tstromberg added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Dec 17, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Dec 17, 2019

Thanks for the heads up. We'll need to do this for v1.18 support.

If you or anyone is interested in helping out with this, your intuition is correct. The steps that need to be performed here are:

  1. Use minikube ssh and run kubeadm config migrate --old-config /var/tmp/minikube/kubeadm.yaml --new-config /var/tmp/minikube/v1beta2.yaml
  2. Run diff -ubB /var/tmp/minikube/kubeadm.yaml /var/tmp/minikube/v1beta2.yaml to inspect the changes.
  3. Copy the var configTmplV1Beta1 template to a new var configTmplV1Beta2 template:
    // configTmplV1Beta1 is for Kubernetes v1.13+
  4. Apply the changes you found into the configTmplV1Beta2 template you just created
  5. Copy this logic to tell minikube to use this template for v1.17.0 or higher:
    if version.GTE(semver.MustParse("1.14.0-alpha.0")) {
  6. Run make and minikube start to confirm that minikube works as expected
  7. Run make test to make sure no tests broke
  8. Send out PR

Thanks!

@tstromberg tstromberg added the area/kubernetes-versions Improving support for versions of Kubernetes label Dec 17, 2019
@alonyb
Copy link

alonyb commented Dec 18, 2019

/assign

I will help with this

@alonyb
Copy link

alonyb commented Jan 7, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes-versions Improving support for versions of Kubernetes good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants