Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Services with clusterIP: None can be created with type LoadBalancer #33036

Closed
thockin opened this issue Sep 19, 2016 · 5 comments · Fixed by #33274
Closed

Services with clusterIP: None can be created with type LoadBalancer #33036

thockin opened this issue Sep 19, 2016 · 5 comments · Fixed by #33274
Labels
area/kubectl help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@thockin
Copy link
Member

thockin commented Sep 19, 2016

Create the following svc:

apiVersion: v1
kind: Service
metadata:
  name: headful
spec:
  clusterIP: None
  type: LoadBalancer
  ports:
  - port: 80
  selector:
    run: hostnames

It should fail.

@thockin thockin added area/api Indicates an issue on api area. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed area/api Indicates an issue on api area. labels Sep 19, 2016
@nebril
Copy link
Contributor

nebril commented Sep 22, 2016

I will try to take a shot at it.

@thockin
Copy link
Member Author

thockin commented Sep 22, 2016

Awesome! Make sure to handle updates in all directions. Historically it
is the thing we forget.

On Thu, Sep 22, 2016 at 6:17 AM, Maciej Kwiek notifications@github.com
wrote:

I will try to take a shot at it.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#33036 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFVgVBkrrLsVqQXSCjef5FIFUrqAaR3zks5qsn_WgaJpZM4KA1P6
.

@nebril
Copy link
Contributor

nebril commented Sep 22, 2016

@thockin do you have any examples of this behaviour breaking something? It would help with justifying my PR in code review process :). I know it makes sense to fix this issue, but an example would be nice.

@thockin
Copy link
Member Author

thockin commented Sep 22, 2016

I had a user report thatthey didn't know what was happening - the API
should have rejected it with a message that you can't have headless
services with load balancers.

On Thu, Sep 22, 2016 at 10:50 AM, Maciej Kwiek notifications@github.com
wrote:

@thockin https://github.com/thockin do you have any examples of this
behaviour breaking something? It would help with justifying my PR in code
review process :).


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#33036 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFVgVGwdq7J8zkJUbha-T68HRmxIxV9pks5qsr_lgaJpZM4KA1P6
.

k8s-github-robot pushed a commit that referenced this issue Sep 30, 2016
Automatic merge from submit-queue

Disallow headless Services with LB type

**What this PR does / why we need it**: It adds new validation rule for Services, to ensure that creating LoadBalancer type service with cluster IP set to "None" fails.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #33036

**Release note**:
```release-note
Creating LoadBalancer Service with "None" ClusterIP is no longer possible
```
grebois added a commit to grebois/charts that referenced this issue Aug 29, 2018
…dBalancer

`Service is invalid: spec.clusterIP: Invalid value: "None": may not be set to 'None' for LoadBalancer services`

Relates to kubernetes/kubernetes#33766 kubernetes/kubernetes#24040 kubernetes/kubernetes#33036

Signed-off-by: grebois <grebois@gmail.com>
@BouchaaraAdil
Copy link

please what are really use cases where we can use k8s headless service, DB, Proxies .. ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants