【问题标题】:"kubeadm-config" in the kube-system namespace used for getting configuration information was not found未找到用于获取配置信息的 kube-system 命名空间中的“kubeadm-config”
【发布时间】:2022-07-07 01:59:37
【问题描述】:

我有一个由 Kubeadm 创建的 Kubernetes 集群。

我当前的集群版本是 v1.19.2 并尝试升级到 v1.20.15-0

现在我正在尝试通过kubeadm upgrade plan 升级 kubeadm 集群,但出现以下错误:

[upgrade/config] FATAL: the ConfigMap "kubeadm-config" in the kube-system namespace used for getting configuration information was not found 

但是当我检查 kube-system 命名空间中的配置映射 kubeadm-config 时。它似乎在那里。

 [root@AWL-MV-IBO-DEV ~]# kubectl get configmap kubeadm-config -n kube-system -o yaml
apiVersion: v1
data:
  ClusterConfiguration: |
    apiServer:
      extraArgs:
        authorization-mode: Node,RBAC
      timeoutForControlPlane: 4m0s
    apiVersion: kubeadm.k8s.io/v1beta2
    certificatesDir: /etc/kubernetes/pki
    clusterName: kubernetes
    controllerManager: {}
    dns:
      type: CoreDNS
    etcd:
      local:
        dataDir: /var/lib/etcd
    imageRepository: k8s.gcr.io
    kind: ClusterConfiguration
    kubernetesVersion: v1.19.2
    networking:
      dnsDomain: cluster.local
      podSubnet: 192.168.0.0/16
      serviceSubnet: 10.96.0.0/12
    scheduler: {}
  ClusterStatus: |
    apiEndpoints:
      awl-mv-ibo-dev:
        advertiseAddress: 10.20.20.214
        bindPort: 6443
    apiVersion: kubeadm.k8s.io/v1beta2
    kind: ClusterStatus
kind: ConfigMap
metadata:
  creationTimestamp: "2020-10-06T13:09:22Z"
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:data:
        .: {}
        f:ClusterConfiguration: {}
        f:ClusterStatus: {}
    manager: kubeadm
    operation: Update
    time: "2020-10-06T13:09:22Z"
  name: kubeadm-config
  namespace: kube-system
  resourceVersion: "162"
  selfLink: /api/v1/namespaces/kube-system/configmaps/kubeadm-config
  uid: a6856541-6e6b-4c7e-9163-05778ef5e1aa

谁能告诉我为什么找不到配置图?

【问题讨论】:

    标签: kubernetes kubeadm configmap


    【解决方案1】:

    这是一个错误,根据 github 中的 thread

    enforceRequirements func 中发现了一个用于升级的错误 计划。如果指定目标 Kubernetes 的命令行参数 提供版本,返回ClusterConfiguration by enforceRequirements 将其 KubernetesVersion 字段设置为 新版本。

    如果没有指定版本,返回的KubernetesVersion 指向 当前安装的。

    唯一的选择是使enforceRequirements 在 升级计划案例并始终返回当前安装的版本 KubernetesVersion 字段。

    在此thread 中了解有关此修复的更多信息。

    【讨论】:

      猜你喜欢
      • 2019-05-21
      • 2022-12-29
      • 1970-01-01
      • 2018-03-22
      • 2019-08-14
      • 2021-03-16
      • 1970-01-01
      • 2020-03-24
      • 2021-03-17
      相关资源
      最近更新 更多