Skip to content

clients are not working if k8s cluster require proxy to access #333

Closed
@abhi24k

Description

@abhi24k

I am trying to reach k8s cluster hosted in aws. Using kubectl command I'm able to list all the nodes present in the cluster since proxy is set in the environment, but using kubernetes-incubator python client I am unable to do so, not really know where to set proxy.

code snippet
from kubernetes import client,config
from kubernetes.client import configuration

config.load_kube_config('/root/.kube/config.devenv')
print configuration.host
v1=client.CoreV1Api()

v1.list_node()

ERROR
https://abhishek-api.dev.devops.net
2017-08-27 03:28:40,499 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fdccc9d7210>: Failed to establish a new connection: [Errno 110] Connection timed out',)': /api/v1/nodes

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions