# Quota on nodeports service affects creation of clusterip service

**URL:** <https://discuss.kubernetes.io/t/quota-on-nodeports-service-affects-creation-of-clusterip-service/14186>\
**Category:** General Discussions\
**Created:** [December 21, 2020, 8:10am UTC](https://discuss.kubernetes.io/t/quota-on-nodeports-service-affects-creation-of-clusterip-service/14186 "2020-12-21T08:10:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![b10s](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/b10s/32/6520_2.png) [@b10s](https://discuss.kubernetes.io/u/b10s)\
**Post date:** [December 21, 2020, 8:10am UTC](https://discuss.kubernetes.io/t/quota-on-nodeports-service-affects-creation-of-clusterip-service/14186/1 "2020-12-21T08:10:26Z")

</div>

### Cluster information:

Kubernetes version: 1.19.4  
Cloud being used: bare-metal  
Installation method: in-house scripts for prod cluster, minikube for test  
Host OS: CoreOS in prod, whatever OS minikube uses by default  
CNI and version: not sure  
CRI and version: not sure

### Question

Hi k8s api folks,

I have question about quota in k8s.

Having 2 services of type `nodeports` I do set a hard quota limiting `services.nodeports` to 0.  
Then I’m failing to create `clusterip` service with error:

```auto
$ k create svc clusterip cip --tcp=1234:1234
Error from server (Forbidden): services "cip" is forbidden: exceeded quota: default-quota, requested: services.nodeports=0, used: services.nodeports=2, limited: services.nodeports=0

```

Do I understand right that the creation of `clusterip` service requires 0 services of `nodeports`, therefore in total, taking in account 2 already existed, I exceed the quota?

Might it be a bug or it’s expected behavior?  
If expected, may you explain why `clusterip` requires 0 `nodeports`?

---

<div class="post-metadata">

**Author:** ![thockin](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/thockin/32/2457_2.png) [@thockin](https://discuss.kubernetes.io/u/thockin)\
**Post date:** [December 22, 2020, 11:31pm UTC](https://discuss.kubernetes.io/t/quota-on-nodeports-service-affects-creation-of-clusterip-service/14186/2 "2020-12-22T23:31:28Z")

</div>

This sounds wrong - can you file a github issue, ideally with full YAML of all services and quotas, so we can reproduce it?

---

<div class="post-metadata">

**Author:** ![b10s](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/b10s/32/6520_2.png) [@b10s](https://discuss.kubernetes.io/u/b10s)\
**Post date:** [December 23, 2020, 7:51am UTC](https://discuss.kubernetes.io/t/quota-on-nodeports-service-affects-creation-of-clusterip-service/14186/3 "2020-12-23T07:51:05Z")

</div>

Yup, here it is

> <https://github.com/kubernetes/kubernetes/issues/97437>
>
> Having 2 services of type nodeports I do set a hard quota limiting services.nodeports to 0.
> Then I'm failing to create clusterip...
