Sorry, haven’t noticed that jupyterhub logs have been omitted by the forum.
The problem is that when the Kubernetes plugin in python sends requests to K8S API, it doesn’t trust the certificate which is used by the K8S API server. This certificate was created by CA in K8S with the self-signed certificate.
If i will try within container to send request to the K8S API server, i will have this issue:
http.request(“GET”, “https://10.96.0.1”)
Result:
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='10.96.0.1', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))
If I will use CA cert from K8S with these requests, everything smooth:
**curl https://10.96.0.1 --cacert** /usr/local/share/ca-certificates/rots.crt/ca.crt
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "forbidden: User \"system:anonymous\" cannot get path \"/\"",
"reason": "Forbidden",
"details": {
},
"code": 403
So how to push CA cert into the container ?
I use the latest versions of jupyterhub with default configuration except:
ingress:
enabled: true
K8S is a managed service, I do not know how it was configured, and i have no access to the master node.
Logs from jupyterhub:
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='10.96.0.1', port=443): Max retries exceeded with url: /api/v1/namespaces/jupiter/pods?fieldSelector=&labelSelector=component%3Dsingleuser-server (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get issuer certificate (_ssl.c:1123)')))