v36.0.0 regression fetching container logs

Đang mở
#2,596 12 bình luận 2 reaction 1 người được giao Xem trên GitHub

@yliaog đang làm issue này rồi.

Từ ngày 16/7/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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
Ngôn ngữ chính
Python
Star
7.7k
Fork
3.5k
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
18

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của kubernetes-client/python

Tất cả issue của kubernetes-client/python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.