zalando / zalando/postgres-operator

Certification verification failed when connecting to kube-apiserver endpoint

Open
#930 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Hello,

I have successfully managed to deploy the postgres-operator. When I apply the minimal-postgres-manifest.yaml file to create the minimal cluster the logs for the pod are filled with the following error messages.

2020-04-23 22:06:16,894 ERROR: ObjectCache.run MaxRetryError("HTTPSConnectionPool(host='10.254.0.1', port=443): Max retries exceeded with url: /api/v1/namespaces/default/pods?labelSelector=application%3Dspilo%2Ccluster-name%3Dacid-minimal-cluster (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))",)
2020-04-23 22:06:16,896 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)': /api/v1/namespaces/default/endpoints?labelSelector=application%3Dspilo%2Ccluster-name%3Dacid-minimal-cluster
2020-04-23 22:06:16,900 ERROR: ObjectCache.run MaxRetryError("HTTPSConnectionPool(host='10.254.0.1', port=443): Max retries exceeded with url: /api/v1/namespaces/default/endpoints?labelSelector=application%3Dspilo%2Ccluster-name%3Dacid-minimal-cluster (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))",)

I believe that that this is because one of the components, possibly Patroni, is unable to connect to the kube-apiserver endpoint because it cannot verify the API server certificate. I have searched through the documentation but cannot find a way to specify the client or CA certificate to use.

Is there some way to do this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with minimal-postgres-manifest.yaml and inspect the kube-apiserver connection used by the operator or Patroni. Confirm how CA or client certificates are currently supplied, then verify that the pod can establish the Kubernetes API connection without certificate errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, postgresql
Domain
databases, infrastructure, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.