Skip to content

CICD-365 · Automated incident diagnostic collection ​

Encyclopedia · Observability and SRE pipelines · All snippets

Previous · CICD-364 · Next · CICD-366

1. Where it fits ​

  • Placement CI diagnostic step.
  • Prerequisites staging metrics stack, provisioned endpoints and read-only CI identity except explicitly approved writes.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
mkdir -p evidence
kubectl -n staging get deploy,pod -o wide > evidence/workloads.txt
kubectl -n staging get events --sort-by=.metadata.creationTimestamp > evidence/events.txt

3. How it works ​

The commands write workload and event snapshots into a bounded evidence directory. Review names and annotations for sensitive details before upload.

4. Verify the result ​

Review and scrub evidence before uploading. Restrict namespace, retention and artifact access.

Validation syntax-validated (Bash parse). Status definitions.