CICD-467 · Kubernetes resource rightsizing
Encyclopedia · FinOps and resource optimization · All snippets
Previous · CICD-466 · Next · CICD-468
1. Where it fits
- Placement CI rightsizing report.
- Prerequisites authorized read reports, explicit pricing period and reviewed ownership for cleanup.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
kubectl -n staging get verticalpodautoscaler web -o json | jq -e '.status.recommendation.containerRecommendations[] | {containerName,target,lowerBound,upperBound}'3. How it works
The expression filters or transforms the input JSON. Where jq -e is used, a false or empty result can fail the gate. The command archives or inspects the selected files. Verify the relative paths and file set before using the archive downstream.
4. Verify the result
Requires VPA in recommendation mode. Review startup peaks and rollout behavior before changing requests.
Validation syntax-validated (Bash parse). Status definitions.