# clusterServiceDNSMode nok (non sharding setup)

**URL:** <https://forums.percona.com/t/clusterservicednsmode-nok-non-sharding-setup/35347>\
**Category:** Percona Operator for MongoDB\
**Created:** [November 29, 2024, 2:39am UTC](https://forums.percona.com/t/clusterservicednsmode-nok-non-sharding-setup/35347 "2024-11-29T02:39:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamoser](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jamoser](https://forums.percona.com/u/jamoser)\
**Post date:** [November 29, 2024, 2:39am UTC](https://forums.percona.com/t/clusterservicednsmode-nok-non-sharding-setup/35347/1 "2024-11-29T02:39:01Z")

</div>

Hello

Managed to upgrade to 1.15, when trying to apply cr.yaml with

```
expose:
  enabled: true
  exposeType: NodePort
  clusterServiceDNSMode: External

```

I get the the following error

kubectl -n abc apply -f cr.yaml --dry-run=server

Error from server (BadRequest): error when creating “cr.yaml”: PerconaServerMongoDB in version “v1” cannot be handled as a PerconaServerMongoDB: strict decoding error: unknown field “spec.replsets[0].expose.clusterServiceDNSMode”

Funny thing is if I run

kubectl -n abc apply -f cr.yaml --dry-run=server **–validate=false**

it works ?!

→ But I would really like to know how to apply correctly.

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [December 2, 2024, 8:40am UTC](https://forums.percona.com/t/clusterservicednsmode-nok-non-sharding-setup/35347/2 "2024-12-02T08:40:07Z")

</div>

@jamoser `clusterServiceDNSMode` should be under `spec`, not `expose` section. (see in [the doc](https://docs.percona.com/percona-operator-for-mongodb/expose.html#controlling-hostnames-in-replset-configuration))

I just believe that starting 1.15 our validation rules became stricter. Skipping validation will have this field added, but it will not have any effect.
