Closed
Description
python 3.7
client 10.0.1
from kubernetes import client, config
config.kube_config.load_kube_config(config_file="F:\\config.yaml")
class Kubernetes:
def __init__(self):
self.Connect = client.CoreV1Api()
def list_namespaces(self):
data = []
for ns in self.Connect.list_namespace().items:
data.append(ns)
return data
k = Kubernetes()
print(k.list_namespaces())
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='172.18.56.103', port=6443): Max retries exceeded with url: /api/v1/namespaces (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get issuer certificate (_ssl.c:1056)')))
Can't verify the certificate. What should I do?