Bug 1378011 - [platformmanagement_public_624]Should have option to specify the external load balancer for 'oc create service loadbalancer' command
Summary: [platformmanagement_public_624]Should have option to specify the external loa...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Michail Kargakis
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-21 10:01 UTC by zhou ying
Modified: 2016-12-06 15:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-06 15:07:40 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description zhou ying 2016-09-21 10:01:46 UTC
Description of problem:
Didn't have option to specify the external load balancer  for create loadbalancer  service , couldn't specify the external load balancer 

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 loadbalancer  service command;


Actual results:
2. There was no option to specify the external load balancer 


Expected results:
2. Should have  option  to specify the external load balancer

Additional info:

Comment 3 Michal Fojtik 2016-10-25 14:35:50 UTC
(In reply to zhou ying from comment #0)
> Description of problem:
> Didn't have option to specify the external load balancer  for create
> loadbalancer  service , couldn't specify the external load balancer 
> 
> 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 loadbalancer  service command;
> 
> 
> Actual results:
> 2. There was no option to specify the external load balancer 
> 
> 
> Expected results:
> 2. Should have  option  to specify the external load balancer
> 
> Additional info:


I'm not sure what you mean with external loadbalancer, but using this command:

$ oc create service loadbalancer test --tcp=6000:5000

it creates the service "test" that has type set to LoadBalancer:

apiVersion: v1
kind: Service
metadata:
  creationTimestamp: 2016-10-25T14:33:32Z
  labels:
    app: test
  name: test
  namespace: test
  resourceVersion: "2961"
  selfLink: /api/v1/namespaces/test/services/test
  uid: 00efb050-9ac0-11e6-b245-a268e445cf32
spec:
  clusterIP: 172.30.64.31
  deprecatedPublicIPs:
  - 172.46.66.215
  externalIPs:
  - 172.46.66.215
  ports:
  - name: 6000-5000
    nodePort: 32742
    port: 6000
    protocol: TCP
    targetPort: 5000
  selector:
    app: test
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer:
    ingress:
    - ip: 172.46.66.215

Comment 4 zhou ying 2016-11-01 08:34:19 UTC
When I use command: 
oc create service loadbalancer hello-pod --tcp=5678:8080

The EXTERNAL-IP always "pending"

[root@zhouy testjson]# oc get svc
NAME        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
hello-pod   172.31.201.188   <pending>     5678/TCP   1m
[root@zhouy testjson]# oc get svc hello-pod -o yaml 
apiVersion: v1
kind: Service
metadata:
  creationTimestamp: 2016-11-01T08:27:28Z
  labels:
    app: hello-pod
  name: hello-pod
  namespace: zhouy
  resourceVersion: "5931"
  selfLink: /api/v1/namespaces/zhouy/services/hello-pod
  uid: 06aeca1a-a00d-11e6-abf3-42010af0000a
spec:
  clusterIP: 172.31.201.188
  ports:
  - name: 5678-8080
    nodePort: 31272
    port: 5678
    protocol: TCP
    targetPort: 8080
  selector:
    app: hello-pod
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}

Comment 5 zhou ying 2016-11-09 05:45:20 UTC
When I tested , the EXTERNAL-IP always pending?

Comment 6 zhou ying 2016-11-09 10:14:46 UTC
I'm not sure how to get the EXTERNAL-IP or which env have this function?

Comment 7 Michail Kargakis 2016-12-06 15:07:40 UTC
After reading through the upstream doc regarding creating an external loadbalancer[1], it seems that you cannot specify the external ip before creating the Loadbalancer service.

"The Kubernetes service controller automates the creation of the external load balancer, health checks (if needed), firewall rules (if needed) and retrieves the external IP allocated by the cloud provider and populates it in the service object"

So it seems that such an option doesn't make sense for `create loadbalancer`. I am closing this issue.

[1] http://kubernetes.io/docs/user-guide/load-balancer/


Note You need to log in before you can comment on or make changes to this bug.