我正在尝试将1.9.0群集升级到1.10。 kubeadm升级计划命令给出以下错误消息。如何解决此错误消息
kubeadm upgrade plan
[preflight] Running pre-flight checks.
[upgrade] Making sure the cluster is healthy:
[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'
[upgrade/config] FATAL: could not decode configuration: unable to decode config from bytes: v1alpha1.MasterConfiguration: KubeProxy: v1alpha1.KubeProxy: Config: v1alpha1.KubeProxyConfiguration: FeatureGates: ReadMapCB: expect { or n, but found ", error found in #10 byte of ...|reGates":"","healthz|..., bigger context ...|24h0m0s"},"enableProfiling":false,"featureGates":"","healthzBindAddress":"0.0.0.0:10256","hostnameOv|...
YAML配置文件输出:
apiVersion: v1
data:
MasterConfiguration: |
api:
advertiseAddress: 192.168.16.211
bindPort: 6443
authorizationModes:
- Node
- RBAC
certificatesDir: /etc/kubernetes/pki
cloudProvider: ""
etcd:
caFile: ""
certFile: ""
dataDir: /var/lib/etcd
endpoints: null
image: ""
keyFile: ""
imageRepository: gcr.io/google_containers
kubeProxy:
config:
bindAddress: 0.0.0.0
clientConnection:
acceptContentTypes: ""
burst: 10
contentType: application/vnd.kubernetes.protobuf
kubeconfig: /var/lib/kube-proxy/kubeconfig.conf
qps: 5
clusterCIDR: 10.244.0.0/16
configSyncPeriod: 15m0s
conntrack:
max: null
maxPerCore: 32768
min: 131072
tcpCloseWaitTimeout: 1h0m0s
tcpEstablishedTimeout: 24h0m0s
enableProfiling: false
featureGates: ""
healthzBindAddress: 0.0.0.0:10256
hostnameOverride: ""
iptables:
masqueradeAll: false
masqueradeBit: 14
minSyncPeriod: 0s
syncPeriod: 30s
ipvs:
minSyncPeriod: 0s
scheduler: ""
syncPeriod: 30s
metricsBindAddress: 127.0.0.1:10249
mode: ""
oomScoreAdj: -999
portRange: ""
resourceContainer: /kube-proxy
udpTimeoutMilliseconds: 250ms
kubeletConfiguration: {}
kubernetesVersion: v1.9.0
networking:
dnsDomain: cluster.local
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/12
nodeName: k8sm-01
token: ""
tokenTTL: 24h0m0s
unifiedControlPlaneImage: ""
kind: ConfigMap
metadata:
creationTimestamp: 2017-10-06T20:44:05Z
name: kubeadm-config
namespace: kube-system
resourceVersion: "2462269"
selfLink: /api/v1/namespaces/kube-system/configmaps/kubeadm-config
uid: 1818b79c-aad7-11e7-9ef5-525400ada096
答案 0 :(得分:4)
之后是kubernetes issue 61764,其中提到了Before upgrading section:
kube-proxy
:功能门现在通过JSON或YAMLKubeProxyConfiguration
指定为地图,而不是一串键值对。
例如:
KubeProxyConfiguration
之前:apiVersion: kubeproxy.config.k8s.io/v1alpha1 kind: KubeProxyConfiguration **featureGates: "SupportIPVSProxyMode=true"**
KubeProxyConfiguration
之后:apiVersion: kubeproxy.config.k8s.io/v1alpha1 kind: KubeProxyConfiguration **featureGates:** ** SupportIPVSProxyMode: true**
和
如果
featureGates: ""
,则替换为featureGates: {}
实际上,OP sfgroups广告in the comments:
更改了配置:
featureGates: {""}