Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatchV1_api.list_namespaced_job returns only partial data #1214

Open
liorschwimmer opened this issue Jul 26, 2020 · 1 comment
Open

BatchV1_api.list_namespaced_job returns only partial data #1214

liorschwimmer opened this issue Jul 26, 2020 · 1 comment
Labels

Comments

@liorschwimmer
Copy link

@liorschwimmer liorschwimmer commented Jul 26, 2020

I'm using kubernetes==10.1.0
My code is in python 3.7 and something like that:

from kubernetes import client as kubernetes_client
BatchV1_api = kubernetes_client.BatchV1Api()
api_response = BatchV1_api.list_namespaced_job(namespace="default", watch = False, pretty='true', async_req=False )

The problem is I got about 1500 jobs in kubernetes and api_response returns only 20
The goal is to implement program which go throw all jobs and delete old ones by job name as parameter
Any idea why I'm getting only partial data from BatchV1_api.list_namespaced_job function?

@roycaihw
Copy link
Member

@roycaihw roycaihw commented Aug 7, 2020

I wonder if you're doing paging list. Could you enable the debug logging and verify if the response contains a continue token?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.