Skip to content

Using no_proxy attribute does not work as expected #1995

Closed
@jandbg

Description

@jandbg

Hi all! First I would like to said thanks for the this k8s client library, I think it´s a great tool! We use it a lot in our projects.
We are facing the following issue. We have a pod (lets said pod A) where we´re running a program based on:
https://github.com/kubernetes-client/python/blob/master/examples/pod_exec.py

The goal of the pogram is to execute a command in another pod, lets said pod B.

In the pod A we have defined an HTTPS_PROXY environment variable, and we would like to bypass this HTTPS_PROXY, so we set the atributte no_proxy on the kubernetes.client.Configuration class. We are not very sure how to use this attribute, we set no_proxy attribute with the pod B´s IP address but we still get the "Error 407 Proxy authentication". So I guess we couldn´t bypass the proxy.

The question is, how I should proceed to execute the command in the pod B and bypass the HTTPS_PROXY? How I must setup the no_proxy attribute? I mean, I guess is a IPs string comma separated, I´m right? Something like this "100.67.5.3.170,100.65.2.169"

Thank you very much in advance, best regards!

Environment:

  • Kubernetes Version: v1.23.12+8a6bfe4
  • PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
    NAME="Debian GNU/Linux"
    VERSION_ID="11"
    VERSION="11 (bullseye)"
    VERSION_CODENAME=bullseye
    ID=debian
  • Python 3.8.16
  • Python client version (pip list | grep kubernetes): kubernetes 24.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.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