k8s-image-audit
Installation
SKILL.md
K8s Image & Deployment Audit
Audit the K8s cluster for image and deployment issues: $ARGUMENTS
Checks to Perform
1. Image Freshness
# List all running images with their pull policies
kubectl get pods -n <namespace> -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range .spec.containers[*]}{.image}{"\t"}{.imagePullPolicy}{"\n"}{end}{end}'
# Check image creation dates
for pod in $(kubectl get pods -n <namespace> -o name); do
IMAGE=$(kubectl get $pod -n <namespace> -o jsonpath='{.spec.containers[0].image}')
echo "$pod -> $IMAGE"
done