| Summary: | [platformmanagement_public_624]Should have '--nodeport' option for 'oc create service nodeport' command | ||
|---|---|---|---|
| Product: | OKD | Reporter: | zhou ying <yinzhou> |
| Component: | oc | Assignee: | Juan Vallejo <jvallejo> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Xingxing Xia <xxia> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.x | CC: | aos-bugs, cewong, jvallejo, mmccomas, xxia, yinzhou |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-12-09 21:53:39 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
zhou ying
2016-09-21 10:03:22 UTC
Hm, could you clarify a bit more on this bug? I believe I may be misunderstanding this bug: Although `oc create service nodeport` does not have a `--nodeport` option, it does have a `--tcp` option which takes a "<port>:<target_port>". 1. Create a new nodeport service `$ oc create service nodeport mynodeport --tcp=80:8080` 2. Describe this service ``` $ oc describe service/mynodeport Name: mynodeport Namespace: default Labels: app=mynodeport Selector: app=mynodeport Type: NodePort IP: 172.30.149.2 Port: 80-8080 80/TCP NodePort: 80-8080 30206/TCP Endpoints: <none> Session Affinity: None No events. ``` As can be seen in the above case, although there is no `--nodeport` option, a "nodeport" value can still be specified through the command with `--tcp`. Version: oc v1.3.0-rc1+2b9e40a-dirty kubernetes v1.4.0-beta.3+d19513f features: Basic-Auth Server https://10.13.137.149:8443 openshift v1.3.0-rc1 kubernetes v1.3.0+52492b4 But the nodeport (NodePort: 80-8080 30206/TCP) is random from the range, if has option, we could specify the nodeport. Juan, Zhou, yes, I see what you mean. If you don't want the nodeport to be randomly generated, you'd need to specify it somehow. Juan, I can show you where that could be set. Thanks for your help Cesar! Related PR: https://github.com/openshift/origin/pull/11059 Confirmed with the latest origin ami , the issue has fixed: openshift version openshift v1.4.0-alpha.0+606716e kubernetes v1.4.0+776c994 etcd 3.1.0-alpha.1 [zhouy@zhouy testjson]$ oc create service nodeport hello-pod --tcp=5678:8080 --node-port=30899 service "hello-pod" created [zhouy@zhouy testjson]$ oc get service NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-pod 172.30.43.122 <nodes> 5678/TCP <invalid> [zhouy@zhouy testjson]$ oc describe service hello-pod Name: hello-pod Namespace: zhouy Labels: app=hello-pod Selector: app=hello-pod Type: NodePort IP: 172.30.43.122 Port: 5678-8080 5678/TCP NodePort: 5678-8080 30899/TCP Endpoints: 172.17.0.2:8080 Session Affinity: None No events. [root@ip-172-18-4-233 ~]# curl 172.18.4.233:30899 Hello OpenShift! |