Add support bundle analyzer for PDB eviction failures #3290
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a support bundle analyzer that detects PodDisruptionBudget-related pod eviction failures in k0scontroller logs. These failures cause autopilot upgrades to hang, making the cluster unable to complete upgrades.
Problem
When customers deploy PodDisruptionBudgets with restrictive settings (e.g.,
minAvailabletoo high ormaxUnavailabletoo low), the k0s autopilot cannot evict pods during node draining. This causes cluster upgrades to hang indefinitely. Previously, identifying this issue required manually grepping through k0scontroller logs.Solution
The new analyzer:
error when evicting podsCannot evict pod as it would violate the pod's disruption budgetTesting
Impact
This change significantly reduces time-to-resolution for PDB-blocked upgrade issues by surfacing the problem automatically in support bundle analysis.
Related Issues
Related to recent troubleshoot repo work on partial discovery failures with Kubernetes API in cluster-resources collector.