kubectl: kubectl get doesn't stream results with many results

I’ve got a cluster here with many many objects of a specific resource type (probably too many), and I’m trying to list them anyway:

$ kubectl get myresourcetype
<hangs for ever, or not but who knows>

If I run the same request with v8, I can see that it’s running a lot of requests to the apiserver, with the continue token etc. But it looks like none of these resources are going to be printed before they are all collected.

There is a chunk-size parameter, but that only guides the number of objects returned by each request, not how things are going to be displayed, there’s also no limit parameter.

That seems wrong to me.

/assign @soltysh @seans3 cc @lavalamp

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 2
  • Comments: 18 (17 by maintainers)

Most upvoted comments

Agree about the post/pre processing in apply, but I’m hoping this is unrelated because it’s get. I agree that sorting will make it difficult, but in that case, would be nice to have an option to disable sorting altogether in order to stream the results