【问题标题】:Kubernetes: Trying to add second master node to K8S master using stacked control plane instructionsKubernetes:尝试使用堆叠控制平面指令将第二个主节点添加到 K8S 主节点
【发布时间】:2018-12-13 14:39:00
【问题描述】:

我按照https://kubernetes.io/docs/setup/independent/high-availability/#stacked-control-plane-and-etcd-nodes 的说明进行操作,但无法让辅助主节点加入主主节点。

$> kubeadm join LB_IP:6443 --token TOKEN --discovery-token-ca-cert-hash sha256:HASH --experimental-control-plane
[preflight] running pre-flight checks
[discovery] Trying to connect to API Server "LB_IP:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://LB_IP:6443"
[discovery] Requesting info from "https://LB_IP:6443" again to validate TLS against the pinned public key
[discovery] Cluster info signature and contents are valid and TLS certificate validates against pinned roots, will use API Server "LB_IP:6443"
[discovery] Successfully established connection with API Server "LB_IP:6443"
[join] Reading configuration from the cluster...
[join] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'

One or more conditions for hosting a new control plane instance is not satisfied.

unable to add a new control plane instance on a cluster that doesn't use an external etcd

Please ensure that:
* The cluster has a stable controlPlaneEndpoint address.
* The cluster uses an external etcd.
* The certificates that must be shared among control plane instances are provided.

这是我的管理员初始化配置:

apiVersion: kubeadm.k8s.io/v1alpha3
kind: ClusterConfiguration
kubernetesVersion: "1.12.3"
apiServer:
  certSANs:
  - "LB_IP"
controlPlaneEndpoint: "LB_IP:6443"
networking:
  podSubnet: "192.168.128.0/17"
  serviceSubnet: "192.168.0.0/17"

我初始化了主主节点,如:

kubeadm init --config=./kube-adm-config.yaml

我还将所有证书复制到辅助节点,kubectl 在辅助节点上工作:

[root@secondary ~]# kubectl get nodes
NAME                            STATUS   ROLES    AGE   VERSION
primary.fqdn                    Ready    master   8h    v1.12.3

我真的希望不要设置外部 etcd 节点。说明看起来很简单,我不明白我错过了什么。

如果有任何建议可以帮助使用本地 etcd 使这种堆叠式控制平面多主机设置正常工作,我们将不胜感激。或任何调试想法。或者至少“堆叠控制平面不起作用,你必须使用外部 etcd”。

【问题讨论】:

    标签: kubernetes


    【解决方案1】:

    升级到 k8s 版本 1.13.0 解决了我的问题。我认为这些说明是专门针对这个较新版本的。

    【讨论】:

    • 是的,您对 1.13 版的说明
    猜你喜欢
    • 2020-04-26
    • 2019-12-15
    • 1970-01-01
    • 2019-09-14
    • 1970-01-01
    • 1970-01-01
    • 2020-09-27
    • 2021-10-03
    • 2019-01-21
    相关资源
    最近更新 更多