# TLS mode requireTLS not working

**URL:** <https://forums.percona.com/t/tls-mode-requiretls-not-working/39319>\
**Category:** Percona Operator for MongoDB\
**Created:** [September 9, 2025, 7:08pm UTC](https://forums.percona.com/t/tls-mode-requiretls-not-working/39319 "2025-09-09T19:08:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fetah\_Jusufi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/fetah_jusufi/32/21991_2.png) [@Fetah\_Jusufi](https://forums.percona.com/u/Fetah_Jusufi)\
**Post date:** [September 9, 2025, 7:08pm UTC](https://forums.percona.com/t/tls-mode-requiretls-not-working/39319/1 "2025-09-09T19:08:22Z")

</div>

## Description:

trying to make it enable but it doesnt work!

always get

```auto
--tlsMode disabled

```

the cr.yaml

```auto
spec:
  secrets:
    keyFile: percona-keyfile
    encryptionKey: percona-cluster-mongodb-encryption-key
    ssl: percona-cluster-ssl
    sslInternal: percona-cluster-ssl-internal
  tls:
    mode: requireTLS

```

I followed the guide from Docs to create

```auto
percona-cluster-ssl
percona-cluster-ssl-internal

```

tried the type tls and Opaque, nothing works.

I also tried to put these settings in configuration, but it didnt work!

this

```auto
kubectl logs -n percona deploy/psmdb-operator --tail=200 | grep -i tls

```

returns nothing, always.

## Version:

Im on GKE, PMM 2.43.0, Server 8.8.8-3, Backup 2.9.1, Operator 1.20.1

##

---

<div class="post-metadata">

**Author:** ![Fetah\_Jusufi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/fetah_jusufi/32/21991_2.png) [@Fetah\_Jusufi](https://forums.percona.com/u/Fetah_Jusufi)\
**Post date:** [September 10, 2025, 8:14am UTC](https://forums.percona.com/t/tls-mode-requiretls-not-working/39319/2 "2025-09-10T08:14:48Z")

</div>

Hello there,

I got it working by downgrading the Operator to 1.20.0, which now accepts all the modes for TLS.

But I cant seem to find a solution to set the

```auto
allowConnectionsWithoutCertificates: true

```

I tried

```auto
requireTLS
preferTLS

```

getting this error while connecting locally, and I added localhost and 127.0.0.1 in server cert as DNS and IP, like this

```auto
{
  "hosts": [
    "localhost",
    "127.0.0.1",
    "percona-cluster-rs0",
    "percona-cluster-rs0.percona",
    "percona-cluster-rs0.percona.svc.cluster.local",
    "*.percona-cluster-rs0",
    "*.percona-cluster-rs0.percona",
    "*.percona-cluster-rs0.percona.svc.cluster.local"
  ],
  "CN": "percona-cluster",
  "names": [
    { "O": "PSMDB" }
  ],
  "key": {
    "algo": "rsa",
    "size": 2048
  }
}

```

the error:

```auto
Connecting to: mongodb://<credentials>@localhost:27017/admin?directConnection=true&serverSelectionTimeoutMS=2000&tls=true&tlsCAFile=%2Fetc%2Fmongodb-ssl%2Fca.crt&appName=mongosh+2.5.0 MongoServerSelectionError: connection <monitor> to 127.0.0.1:27017 closed

```

can somebody please help me, I also tried to put in the configuration part, but it doesnt start at all!

```auto
configuration: |
        net:
          bindIpAll: true
        ssl:
            allowConnectionsWithoutCertificates: true

```
