# Disable TLS Percona PostgreSQL Operator

**URL:** <https://forums.percona.com/t/disable-tls-percona-postgresql-operator/28777>\
**Category:** Percona Operator for PostgreSQL\
**Tags:** percona, postgres\
**Created:** [February 28, 2024, 2:13am UTC](https://forums.percona.com/t/disable-tls-percona-postgresql-operator/28777 "2024-02-28T02:13:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tu\_n\_Nguy\_n\_Thuc](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/tu_n_nguy_n_thuc/32/10956_2.png) [@Tu\_n\_Nguy\_n\_Thuc](https://forums.percona.com/u/Tu_n_Nguy_n_Thuc)\
**Post date:** [February 28, 2024, 2:13am UTC](https://forums.percona.com/t/disable-tls-percona-postgresql-operator/28777/1 "2024-02-28T02:13:36Z")

</div>

Hello,  
I have deployed Percona PostgreSQL Cluster into kubernetes cluster 3 node. I want to disable TLS certification on my PostgreSQL cluster but when I set the spec.tlsOnly=false in file cr.yaml, I can’t deploy it. Here is my cr.yaml file:

```auto
apiVersion: pgv2.percona.com/v2
kind: PerconaPGCluster
metadata:
  name: cluster1
spec:
  crVersion: 2.3.1
  image: percona/percona-postgresql-operator:2.3.1-ppg16-postgres
  imagePullPolicy: Always
  postgresVersion: 16
  tlsOnly: false
  instances:
  - name: instance1
    replicas: 3

    affinity:
      podAntiAffinity:
        preferredDuringSchedulingIgnoredDuringExecution:
        - weight: 1
          podAffinityTerm:
            labelSelector:
              matchLabels:
                postgres-operator.crunchydata.com/data: postgres
            topologyKey: kubernetes.io/hostname
    dataVolumeClaimSpec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 1Gi
  proxy:
    pgBouncer:
      replicas: 3
      image: percona/percona-postgresql-operator:2.3.1-ppg16-pgbouncer
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            podAffinityTerm:
              labelSelector:
                matchLabels:
                  postgres-operator.crunchydata.com/role: pgbouncer
              topologyKey: kubernetes.io/hostname

```

And here is what i get:

```auto
root@master:~/percona-xtradb-cluster-operator/deploy# kubectl apply -f cr.yaml
Error from server (BadRequest): error when creating "cr.yaml": PerconaPGCluster in version "v2" cannot be handled as a PerconaPGCluster: strict decoding error: unknown field "spec.tlsOnly"

```

Can anyone help me about this?  
Thanks.  
Tuan

---

<div class="post-metadata">

**Author:** ![Barrett](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/barrett/32/15734_2.png) [@Barrett](https://forums.percona.com/u/Barrett)\
**Post date:** [March 20, 2024, 3:17pm UTC](https://forums.percona.com/t/disable-tls-percona-postgresql-operator/28777/2 "2024-03-20T15:17:44Z")

</div>

In version 2.3.1, we changed the way a cluster is run without TLS. Can you try the configuration [in the 2.3.1 documentation](https://docs.percona.com/percona-operator-for-postgresql/2.0/TLS.html#connect-to-the-database-cluster-without-tls) and see if that works?
