How do I configure Kubernetes node labels when creating a cluster with kops?

7/6/2017

When creating a Kubernetes cluster on AWS with kops version 1.6.2, how do I configure Kubernetes labels for nodes? My specific scenario is that I need to set the label beta.kubernetes.io/fluentd-ds-ready as true, because otherwise Fluentd pods won't be scheduled.

My current kops command for creating a cluster looks as follows:

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

How do I also configure kops to set the label beta.kubernetes.io/fluentd-ds-ready=true on created Kubernetes nodes?

-- aknuds1
amazon-web-services
kops
kubernetes

1 Answer

7/6/2017

From https://github.com/kubernetes/kops/issues/742

You can create a yaml file with the cluster definition and the labelling there. On an existing cluster you can then do a rolling update.

-- Javier Salmeron
Source: StackOverflow