[postgres@postgres-operator ~]$ kubectl get all NAME READY STATUS RESTARTS AGE pod/postgres-operator-75c5f455bf-w8cs2 1/1 Running 0 37d pod/postgres-sample-0 5/5 Running 0 37d pod/postgres-sample-1 5/5 Running 0 37d pod/postgres-sample-monitor-0 4/4 Running 0 37d
kubectl cp <pod>:pgsql/data/pg_hba.conf pg_hba.conf.copy
kubectl cp postgres-sample-0:pgsql/data/pg_hba.conf pg_hba.conf.copy
kubectl cp pg_hba.conf.copy <pod>:pgsql/data/pg_hba.conf
kubectl exec <pod> -- pg_ctl reload
kubectl logs <pod> -c instance-logging
The following is a example of errors in reloading the configuration:
2022-01-21 00:20:10.321 UTC [237] LOG: invalid connection type "bad-connection-type" 2022-01-21 00:20:10.321 UTC [237] CONTEXT: line 106 of configuration file "/pgsql/data/pg_hba.conf" 2022-01-21 00:20:10.321 UTC [237] LOG: pg_hba.conf was not reloaded
Note: There will not be any output for a successful config reload.