【问题标题】:Only two master nodes are up in Kubernetes cluster with kops in AWSKubernetes 集群中只有两个主节点启动,AWS 中有 kops
【发布时间】:2019-12-10 00:40:16
【问题描述】:

我正在尝试使用 KOPS 在 AWS 中设置 kubernetes 集群。我配置了 3 个主节点和 6 个节点。但启动集群后,只有两个主节点启动。

我使用的是.k8s.local DNS,而不是购买的 DNS。下面是我用来创建集群的脚本。

kops create cluster \
--cloud=aws \
--name=kops-cassandra-cluster-01.k8s.local \
--zones=ap-south-1a,ap-south-1b,ap-south-1c \
--master-size="t2.small" \
--master-count 3 \
--master-zones=ap-south-1a,ap-south-1b,ap-south-1c \
--node-size="t2.small" \
--ssh-public-key="kops-cassandra-cluster-01.pub" \
--state=s3://kops-cassandra-cluster-01 \
--node-count=6

执行kops update cluster --name=kops-cassandra-cluster-01.k8s.local --state=s3://kops-cassandra-cluster-01 --yes后 只有两个主节点可用,而不是 3 个。

kubectl get nodes 显示:

NAME                                           STATUS   ROLES    AGE   VERSION
ip-172-20-44-37.ap-south-1.compute.internal    Ready    master   18m   v1.12.8
ip-172-20-52-78.ap-south-1.compute.internal    Ready    node     18m   v1.12.8
ip-172-20-60-234.ap-south-1.compute.internal   Ready    node     18m   v1.12.8
ip-172-20-61-141.ap-south-1.compute.internal   Ready    node     18m   v1.12.8
ip-172-20-66-215.ap-south-1.compute.internal   Ready    node     18m   v1.12.8
ip-172-20-69-124.ap-south-1.compute.internal   Ready    master   18m   v1.12.8
ip-172-20-85-58.ap-south-1.compute.internal    Ready    node     18m   v1.12.8
ip-172-20-90-119.ap-south-1.compute.internal   Ready    node     18m   v1.12.8

我是 Kubernetes 新手。我错过了什么吗?

【问题讨论】:

  • kubectl get nodes 显示了什么?粘贴有问题的输出。
  • 您是否在 AWS 上检查过第三个主节点是否实际启动并运行?
  • 我检查过,但根本没有创建第三个主控。我注意到在 AZ ap-south-1c 中没有创建节点。包括工作节点在内的所有节点都在 AZ ap-south-1a 和 ap-south-1b 中。
  • 你检查过 kops 日志。还尝试以详细模式 -v 选项运行 kops 命令。查看此github.com/kubernetes/kops/blob/master/docs/cli/kops.md 了解有关日志选项的更多信息。

标签: amazon-web-services kubernetes cassandra kops kubernetes-cluster


【解决方案1】:

经过大量研究,我才知道这是因为 t2.small 实例类型在 ap-south-1c 中不可用。将区域修改为 eu-west-1a、eu-west-1b、eu-west-1c 后,我可以看到 3 个主节点和 6 个工作节点。感谢@mchawre 的帮助。

【讨论】:

    猜你喜欢
    • 2020-10-15
    • 2021-01-26
    • 2019-07-26
    • 2019-03-15
    • 2018-10-31
    • 2021-06-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多