GuerillaNerd
GuerillaNerd

Reputation: 1150

Set-based label selector for replication controller

Is it possible to specify a set-based label selector for a replication controller? I cannot figure out the syntax to do so in the request json. I can't find anything in the documentation, so if you have a link to the appropriate documentation, that would be helpful.

Upvotes: 1

Views: 521

Answers (1)

briangrant
briangrant

Reputation: 845

This is something we want to support, and is/was underway (see PR 7053), but it is not yet possible.

You can observe the status/progress on: https://github.com/kubernetes/kubernetes/issues/341

It's possible to work around the lack of this feature by creating a new label that would match the selector you'd like and then create a trivial selector that matches that new label.

FYI, you can see the API specification for ReplicationController's spec here: http://kubernetes.io/v1.0/docs/api-reference/definitions.html#_v1_replicationcontrollerspec

The schema is listed as "any", but it's actually a map of string to string, like labels.

Upvotes: 3

Related Questions