v36.0.0 regression fetching container logs

Aperta
#2,596 12 commenti 2 reazioni 1 assegnatario Vedi su GitHub

@yliaog ci sta già lavorando.

Dal 16/7/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

kind/bug

What happened (please include outputs or screenshots):

As of upgrading kubernetes to 36.0.0, something looks wrong in read_namespaced_pod_log

What you expected to happen:

Getting log lines out of my containers

How to reproduce it (as minimally and precisely as possible):

            since_secs = 600
            l = pod_api.read_namespaced_pod_log(namespace="foo-ns",
                                                name="foo-pod",
                                                container="foo-container",
                                                follow=False,
                                                timestamps=True,
                                                since_seconds=600)
            print("logs first chars:", l[:100])

Running with kubernetes 35.0.0, last line logged would say

logs first chars: 2026-05-25T07:52:34.381816807Z [25/05/2026 07:52:34] [MainThread] xxxx

Switching to 36.0.0. Same code outputs:

logs first chars: b'2026-05-24T15:57:23.246955706Z [24/05/2026 15:57:23] [MainThread] 

Got confused at first, try to cast it or decode it into a string .... but no: this is a string already.
That b' are just the two first characters of my string.

Setting timestamps=False doesn't change anything, I'm still getting that b' prefix.

Anything else we need to know?:

Environment:

  • Kubernetes version (kubectl version): v1.31.14
  • Python version (python --version) 3.12.13
  • Python client version (pip list | grep kubernetes) 36.0.0
Lingua principale
Python
Stelle
7.7k
Fork
3.5k
Merge medio
1g 14h
PR unite (30g)
18

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di kubernetes-client/python

Tutte le issue di kubernetes-client/python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.