# Disable service type loadbalancer

**URL:** <https://discuss.kubernetes.io/t/disable-service-type-loadbalancer/4660>\
**Category:** General Discussions\
**Created:** [February 12, 2019, 1:10pm UTC](https://discuss.kubernetes.io/t/disable-service-type-loadbalancer/4660 "2019-02-12T13:10:12Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mrbobbytables](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mrbobbytables/32/7_2.png) [@mrbobbytables](https://discuss.kubernetes.io/u/mrbobbytables)\
**Post date:** [February 13, 2019, 2:15pm UTC](https://discuss.kubernetes.io/t/disable-service-type-loadbalancer/4660/4 "2019-02-13T14:15:23Z")

</div>

I believe you could do this with something like [Open Policy Agent](https://www.openpolicyagent.org). It has more policy driven language and capabilities for handling this sort of thing.

Here is a quick example policy ( **note:** not tested etc.)

```auto
package kubernetes.admission

deny["User not permitted to create LoadBalancer service."] {
    input.request.kind.kind = "Service"
    input.request.operation = "CREATE"
    input.request.object.spec.type = "LoadBalancer"
    not lb_admins
}

lb_admins {
  group := input.request.userInfo.groups[_]
 lb_admin_groups[group]
}

lb_admin_groups = { "cluster-admins", "net-admins" }

```

---

_[View the full topic](https://discuss.kubernetes.io/t/disable-service-type-loadbalancer/4660)._
