Hide Forgot
Description of problem: Didn't have '--selector' option for create service , couldn't specify the labels for service. Version-Release number of selected component (if applicable): openshift version openshift v1.4.0-alpha.0+16f2d39 kubernetes v1.4.0-beta.3+d19513f etcd 3.0.9 How reproducible: Always Steps to Reproduce: 1. Login OpenShift and create project; 2. Check help info for create service command; 3. Try to use '--selector' option with create service command; Actual results: 2. There was no '--selector' option for create service command 3. Prompt error: unknown flag: --selector Expected results: 2. Should have selector option for create service. Additional info:
In the kubernetes issue (https://github.com/kubernetes/kubernetes/issues/33253#issuecomment-249596119) we mention that the right approach to this would be to use `oc set selector` (once it will be available. Do you agree that we can close this bug and wait for that feature to be backported into OpenShift?
It's ok for me .
oc set selector should be the way to go, closing this bug
And almost 2 years later I still don't see `oc set selector` command in 3.11 While on it there are not many parameters to set when creating a service. It is only needed to set selector. Adding one parameter to the `create service` command is IMO well worth in comparison to ask user to run a separate command. In any case, I think this issue has to be closed only after `--selector` parameter is implemented or at least the `oc set selector` command is present. At the moment I don't see any way to create a service on the command line without JSON/YAML.
we can use "oc expose dc somedc", this should be enough for the common user