大网数据广告活动
服务器运维问答

kubeadm - ERROR start version '' not supported

· 52CE 我爱测

Recently I upgraded Kubernetes cluster from version 1.5.3 to 1.6.1 using kubeadm . Now I would like to upgrade from version 1.6.1 to 1.6.2 but I'm facing this error: [root@master ~]#kubeadm upgrade plan --v=5 I1113 14:14:31.04608…

问题原文

原帖链接 · cgrim · CC BY-SA 4.0

Recently I upgraded Kubernetes cluster from version 1.5.3 to 1.6.1 using kubeadm.

Now I would like to upgrade from version 1.6.1 to 1.6.2 but I'm facing this error:

[root@master ~]#kubeadm upgrade plan --v=5
I1113 14:14:31.046080    8368 plan.go:67] [upgrade/plan] verifying health of cluster
I1113 14:14:31.046233    8368 plan.go:68] [upgrade/plan] retrieving configuration from cluster
[upgrade/config] Making sure the configuration is correct:
[upgrade/config] Reading configuration from the cluster...
[upgrade/config] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
I1113 14:14:31.111668    8368 common.go:122] running preflight checks
[preflight] Running pre-flight checks.
I1113 14:14:31.111843    8368 preflight.go:78] validating if there are any unsupported CoreDNS plugins in the Corefile
I1113 14:14:31.143841    8368 preflight.go:103] validating if migration can be done for the current CoreDNS release.
[preflight] Some fatal errors occurred:
    [ERROR CoreDNSUnsupportedPlugins]: start version '' not supported
    [ERROR CoreDNSMigration]: start version '' not supported
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

It seems that kubeadm is not able to resolve CoreDNS version.

Here is the CoreDNS config:

apiVersion: v1
data:
  Corefile: |
    .:53 {
        errors
        health
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
           ttl 30
        }
        prometheus :9153
        forward . /etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }
kind: ConfigMap
metadata:
  creationTimestamp: "2018-12-15T00:02:45Z"
  name: coredns
  namespace: kube-system
  resourceVersion: "45537229"
  selfLink: /api/v1/namespaces/kube-system/configmaps/coredns
  uid: c01fbb58-fffc-11e8-9a01-005056a31666

From where it is reading the version number? Or what can I do to solve this error?

已采纳解答

原帖链接 · cgrim · CC BY-SA 4.0

Finally I discovered the cause of the problem. The coredns pod was terminated and could not resurect itself.

So I removed the pod by:

kubectl -n kube-system delete pod coredns-79ff88449c-4gjzs --grace-period=0 --force

And then installed it manually using deploy.sh script from https://github.com/coredns/deployment/tree/master/kubernetes like this:

./deploy.sh | kubectl apply -f -

Now kubeadm upgrade works again like a charm.

And it seems that kubeadm reads CoreDNS version from the running pod.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-11-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。