Change:
} } <ins> func TestAPIListChunkingWithLabelSelector(t *testing.T) { defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.APIListChunking, true)() clientSet, _, tearDownFn := setup(t) defer tearDownFn() ns := framework.CreateNamespaceOrDie(clientSet, "list-paging-with-label-selector", t) defer framework.DeleteNamespaceOrDie(clientSet, ns, t) rsClient := clientSet.AppsV1().ReplicaSets(ns.Name) for i := 0; i < 10; i++ { rs := newRS(ns.Name) rs.Name = fmt.Sprintf("test-%d", i) odd := i%2 != 0 rs.Labels = map[string]string{"odd-index": strconv.FormatBool(odd)} if _, err := rsClient.Create(context.TODO(), rs, metav1.CreateOptions{}); err != nil { t.Fatal(err) } } calls := 0 firstRV := "" p := &pager.ListPager{ PageSize: 1, PageFn: pager.SimplePageFunc(func(opts metav1.ListOptions) (runtime.Object, error) { calls++ list, err := rsClient.List(context.TODO(), opts) if err != nil { return nil, err } if calls == 1 { firstRV = list.ResourceVersion } return list, err }), } listObj, _, err := p.List(context.Background(), metav1.ListOptions{LabelSelector: "odd-index=true", Limit: 3}) if err != nil { t.Fatal(err) } if calls != 2 { t.Errorf("unexpected list invocations: %d", calls) } list := listObj.(metav1.ListInterface) if len(list.GetContinue()) != 0 { t.Errorf("unexpected continue: %s", list.GetContinue()) } if list.GetResourceVersion() != firstRV { t.Errorf("unexpected resource version: %s instead of %s", list.GetResourceVersion(), firstRV) } var names []string if err := meta.EachListItem(listObj, func(obj runtime.Object) error { rs := obj.(*apps.ReplicaSet) names = append(names, rs.Name) return nil }); err != nil { t.Fatal(err) } if !reflect.DeepEqual(names, []string{"test-1", "test-3", "test-5", "test-7", "test-9"}) { t.Errorf("unexpected items: %#v", list) } } </ins> func makeSecret(name string) *v1.Secret { return &v1.Secret{ ObjectMeta: metav1.ObjectMeta{

Discussion:
has by default, and since 1.22 has the same. They seem to return wrong results in certain situations combined with / . And / also use , so they also don't work correctly. outputs partial list of pods on the node, doesn't evict some of the pods. To make it work correctly, I had to specify works correctly with any , since it's just a performance optimizing parameter. I can't provide an actual concrete example (no = default ), but instead I show how to reproduce it with a smaller I believe that the same problem occurs with create two deployments. there are 5 pods in each. with --selector=app=another-server and , it shows only 4 pods. I could confirm that the problem happens in both case of and regardless namespace, even with , or <details</details<detailsGCP / GKE Standard </details<details</details<details</details<details</details<details</details
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig api-machinery
/sig node
I think this is indeed a bug, after some simple testing, it seems to be an bug unique to 1.24, let me fix it. /assign
/assign
I can reproduce this error in a 1.24 cluster, but not in a 1.23.6 cluster. All clusters are created via kind, and I'm guessing gke may have cherry-picked some commits or had some of their own changes to their branch. So I think this fix should at least cherry-pick to 1.23 to help other distributions fix this issue.
/remove-sig api-machinery