Skip to content

X-Stream-Protocol-Version is required on connect_get_namespaced_pod_exec function #1875

@balu-ce

Description

@balu-ce

kubernetes.client.exceptions.ApiException: (500) when I tried to execute on kubernetes client for one of the pods

res = stream(client.connect_get_namespaced_pod_exec(pod_name, ns, container=container_name, command=comm,stderr=True, stdin=False,stdout=True, tty=False))

kubernetes.client.exceptions.ApiException: (500)
Reason: Internal Server Error
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, no-store, must-revalidate', 'Content-Type': 'application/json', 'Expires': '0', 'Pragma': 'no-cache', 'Date': 'Wed, 10 Aug 2022 05:02:03 GMT', 'Content-Length': '70'})
HTTP response body: {"message":"unable to upgrade: X-Stream-Protocol-Version is required"}

Environment:

  • Kubernetes version (kubectl version):
    Client Version: v1.24.1
    Kustomize Version: v4.5.4

  • OS : MacOS 10.13.6

  • Python version - 3.8

  • Python client version - 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