kubernetes/kops · error

listing pods: %w

Error message

listing pods: %w

What it means

Listing pods across all namespaces failed during toolbox dump, despite the client's raised QPS/burst; an API-server error such as timeout, RBAC denial, or throttling.

Source

Thrown at pkg/dump/podlogs.go:65

func NewPodLogDumper(k8sConfig *rest.Config, artifactsDir string) (*podLogDumper, error) {
	k8sConfig.QPS = 50
	k8sConfig.Burst = 100
	clientSet, err := kubernetes.NewForConfig(k8sConfig)
	if err != nil {
		return nil, fmt.Errorf("creating clientset: %w", err)
	}
	return &podLogDumper{
		k8sClient:    clientSet,
		artifactsDir: artifactsDir,
	}, nil
}

func (d *podLogDumper) DumpLogs(ctx context.Context) error {
	klog.Info("Dumping k8s pod logs")

	allPods, err := d.k8sClient.CoreV1().Pods(v1.NamespaceAll).List(ctx, metav1.ListOptions{})
	if err != nil {
		return fmt.Errorf("listing pods: %w", err)
	}

	jobs := make(chan v1.Pod, len(allPods.Items))
	results := make(chan podLogDumpResult, len(allPods.Items))

	for i := 0; i < podLogDumpConcurrency; i++ {
		go d.getPodLogs(ctx, jobs, results)
	}

	var dumpErr error

	for _, pod := range allPods.Items {
		jobs <- pod
	}
	close(jobs)

	for i := 0; i < len(allPods.Items); i++ {
		result := <-results

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify API server health and the client's RBAC to list pods cluster-wide
  2. Retry the dump
  3. Check for network instability or client-side throttling
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at pkg/dump/podlogs.go:65 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/d50595a26ac9ef1a. Report an issue: GitHub.