Where do you give minions in a Kubernetes cluster a label?

5 views
Skip to first unread message
Assigned to sat...@google.com by me

Stefan Jacobs

unread,
Jan 29, 2015, 4:30:10 AM1/29/15
to google-c...@googlegroups.com
Hi there, 

Can someone please tell me where you label a minion in a Kubernetes cluster? I've looked at quite a few examples and their "kubectl get minions" return <none> as labels.

Am I correct to assume you use this labels in conjunction with the nodeSelector variable in type PodSpec?

The use-case is to assign computational heavy dockers to appropriate machines. 

Thanks, 
Stefan

Reference:
https://groups.google.com/forum/#!msg/google-containers/YSHnHOz--L4/5jbTQCj7IqoJ [At the moment I'm not so pressed to be able to update the label - just to create it.]

Satnam Singh

unread,
Jan 29, 2015, 1:28:41 PM1/29/15
to google-c...@googlegroups.com
Hell Stefan.

I've read through the two links -- thank you!
Brendan, Joe: what is the status of supporting label updates for minions? Do we have a PR in progress for this? I did a quick search of our PRs and could not see something.

Cheers,

Satnam

Brendan Burns

unread,
Jan 29, 2015, 1:59:12 PM1/29/15
to google-c...@googlegroups.com
We do support label updates for minions, it's a little complicated, but basically:

kubectl get minions foo -o json > foo.json

<edit foo.json>

kubectl update -f foo.json

Should do the trick.

--
You received this message because you are subscribed to the Google Groups "Containers at Google" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-contain...@googlegroups.com.
To post to this group, send email to google-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-containers.
For more options, visit https://groups.google.com/d/optout.

Brendan Burns

unread,
Jan 29, 2015, 1:59:34 PM1/29/15
to google-c...@googlegroups.com
We're working on adding a concrete "edit-label" command to kubectl also.

Stefan Jacobs

unread,
Jan 29, 2015, 2:20:51 PM1/29/15
to google-c...@googlegroups.com

Thanks for the reply.

I'll test it tomorrow. I'm from South Africa so the time difference is a problem.

I asked more or less the same question on Stackoverflow here: http://stackoverflow.com/questions/28215472/how-do-you-update-a-node-minions-label-in-kubernetes

Brendan, all difference I can see with your solution is json instead of yaml.

Do I maybe miss something?

Stefan

You received this message because you are subscribed to a topic in the Google Groups "Containers at Google" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-containers/VFYl5HJFM2s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-contain...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages