最近,我使用kubeadm
将Kubernetes集群从1.5.3升级到1.6.1。
现在我想从1.6.1升级到1.6.2,但是我面临这个错误:
[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=...`
kubeadm
似乎无法解析CoreDNS版本。
下面是CoreDNS配置:
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
从哪里读取版本号?或者我能做些什么来解决这个错误?
发布于 2019-11-13 16:07:27
最后我发现了问题的原因。coredns
吊舱被终止,无法自行恢复。
所以我把吊舱取了下来:
kubectl -n kube-system delete pod coredns-79ff88449c-4gjzs --grace-period=0 --force
然后使用deploy.sh
脚本从https://github.com/coredns/deployment/tree/master/kubernetes手动安装它,如下所示:
./deploy.sh | kubectl apply -f -
现在,kubeadm upgrade
又像一种魅力一样工作。
而且kubeadm
似乎从运行舱中读取CoreDNS版本。
发布于 2019-11-13 14:57:34
https://serverfault.com/questions/991670
复制相似问题