Skip to content

SSL Verification error when trying to stream logs from pod #262

Closed
@jonastl

Description

@jonastl

The following snippet when run in a cluster pod generates the error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

from kubernetes import client, config

try:
    config.load_incluster_config()
except:
    config.load_kube_config()

v1 = client.CoreV1Api()

# SSL verification fails
c = v1.connect_get_namespaced_pod_attach(
    name='kube-addon-manager-minikube', namespace='kube-system',
    container='kube-addon-manager', stdin=False, tty=False,
    stdout=True, stderr=False, _preload_content=False
)

Installed packages:

$ pip3 freeze
certifi==2017.4.17
httplib2==0.10.3
ipaddress==1.0.18
kubernetes==2.0.0
oauth2client==4.1.1
pyasn1==0.2.3
pyasn1-modules==0.0.9
python-dateutil==2.6.0
PyYAML==3.12
rsa==3.4.2
six==1.10.0
urllib3==1.21.1
websocket-client==0.42.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions