When I deploy postgres on a kops cluster, the api calls to the kubernetes api fail because it does not trust the kubernetes api certificate. How can I make percona postgres trust my kuberntes api certificate?
Here is the error I am getting.
2022-07-06 20:31:11,485 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=0, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),)': /api/v1/namespaces/pg3/pods?labelSelector=vendor%3Dcrunchydata%2Ccrunchy-pgha-scope%3Dpostgres
2022-07-06 20:31:11,487 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=0, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),)': /api/v1/namespaces/pg3/configmaps?labelSelector=vendor%3Dcrunchydata%2Ccrunchy-pgha-scope%3Dpostgres
2022-07-06 20:31:11,494 ERROR: Request to server https://100.64.0.1:443 failed: MaxRetryError("HTTPSConnectionPool(host='100.64.0.1', port=443): Max retries exceeded with url: /api/v1/namespaces/pg3/pods?labelSelector=vendor%3Dcrunchydata%2Ccrunchy-pgha-scope%3Dpostgres (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),))",)
2022-07-06 20:31:11,495 ERROR: Request to server https://100.64.0.1:443 failed: MaxRetryError("HTTPSConnectionPool(host='100.64.0.1', port=443): Max retries exceeded with url: /api/v1/namespaces/pg3/configmaps?labelSelector=vendor%3Dcrunchydata%2Ccrunchy-pgha-scope%3Dpostgres (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),))",)
2022-07-06 20:31:11,804 ERROR: get_cluster
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/patroni/dcs/kubernetes.py", line 704, in _load_cluster
self._wait_caches(stop_time)
File "/usr/lib/python3.6/site-packages/patroni/dcs/kubernetes.py", line 696, in _wait_caches
raise RetryFailedError('Exceeded retry deadline')
patroni.utils.RetryFailedError: 'Exceeded retry deadline'
2022-07-06 20:31:11,804 WARNING: Can not get cluster from dcs
2022-07-06 20:31:12,495 ERROR: ObjectCache.run TypeError("unsupported operand type(s) for -: 'NoneType' and 'float'",)
2022-07-06 20:31:12,496 ERROR: ObjectCache.run TypeError("unsupported operand type(s) for -: 'NoneType' and 'float'",)
2022-07-06 20:31:12,502 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=0, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),)': /api/v1/namespaces/pg3/pods?labelSelector=vendor%3Dcrunchydata%2Ccrunchy-pgha-scope%3Dpostgres