【问题标题】:How do I configure Kubernetes node labels when creating a cluster with kops?使用 kops 创建集群时如何配置 Kubernetes 节点标签?
【发布时间】:2017-12-10 03:52:41
【问题描述】:

在 AWS 上使用 kops 版本 1.6.2 创建 Kubernetes 集群时,如何为节点配置 Kubernetes 标签?我的具体场景是我需要将标签beta.kubernetes.io/fluentd-ds-ready设置为true,因为otherwise Fluentd pods won't be scheduled

我当前用于创建集群的 kops 命令如下所示:

kops --state s3://example.com create cluster \
--zones eu-central-1a,eu-central-1b,eu-central-1c \
--master-zones eu-central-1a,eu-central-1b,eu-central-1c \
--topology private --networking flannel --master-size m4.large \
--node-size m4.large --node-count 2 --bastion --cloud aws \
--ssh-public-key id_rsa.pub --authorization RBAC --yes \
production.example.com

如何配置 kops 以在创建的 Kubernetes 节点上设置标签 beta.kubernetes.io/fluentd-ds-ready=true

【问题讨论】:

    标签: amazon-web-services kubernetes kops


    【解决方案1】:

    来自https://github.com/kubernetes/kops/issues/742

    您可以创建一个包含集群定义和标签的 yaml 文件。然后,您可以在现有集群上进行滚动更新。

    【讨论】:

    • 如果您更新答案以在问题和配置中包含与我的命令行开关相对应的 YAML 文件,以便根据需要设置节点标签,我会接受!我的问题的重点是找出前进所需的确切配置。
    猜你喜欢
    • 2021-05-14
    • 2018-11-15
    • 2020-08-01
    • 2020-01-19
    • 2018-12-26
    • 2022-09-26
    • 1970-01-01
    • 2020-05-05
    • 2019-06-28
    相关资源
    最近更新 更多