k8s-deploy — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited k8s-deploy (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Safe deployment practices, rollout strategies, and rollback procedures.
Use this skill when:
# Nodes ready?
kubectl get nodes
# Any problematic pods?
kubectl get pods -A | grep -v Running | grep -v Completed
# Resource availability
kubectl top nodes# Verify image exists (example with Docker Hub)
docker manifest inspect <image>:<tag>
# Check current image
kubectl get deployment <name> -o jsonpath='{.spec.template.spec.containers[0].image}'# Save current deployment spec
kubectl get deployment <name> -o yaml > deployment-backup.yaml
# Note current revision
kubectl rollout history deployment/<name># Update container image
kubectl set image deployment/<name> <container>=<image>:<tag>
# Example
kubectl set image deployment/nginx nginx=nginx:1.25
# Watch rollout
kubectl rollout status deployment/<name># Dry-run first (ALWAYS)
kubectl apply -f deployment.yaml --dry-run=client
# Show diff
kubectl diff -f deployment.yaml
# Apply
kubectl apply -f deployment.yaml
# Watch
kubectl rollout status deployment/<name># Strategic merge patch
kubectl patch deployment <name> -p '{"spec":{"replicas":5}}'
# JSON patch
kubectl patch deployment <name> --type='json' \
-p='[{"op":"replace","path":"/spec/replicas","value":5}]'# Status
kubectl rollout status deployment/<name>
# History
kubectl rollout history deployment/<name>
# Specific revision details
kubectl rollout history deployment/<name> --revision=2# Pause (for canary-style manual control)
kubectl rollout pause deployment/<name>
# Resume
kubectl rollout resume deployment/<name># Rollback to previous version
kubectl rollout undo deployment/<name>
# Rollback to specific revision
kubectl rollout undo deployment/<name> --to-revision=2
# Verify rollback
kubectl rollout status deployment/<name># Scale replicas
kubectl scale deployment/<name> --replicas=5
# Scale multiple
kubectl scale deployment/<name1> deployment/<name2> --replicas=3# Create HPA
kubectl autoscale deployment/<name> --min=2 --max=10 --cpu-percent=80
# Check HPA status
kubectl get hpa
# Describe HPA
kubectl describe hpa <name>spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25% # Max pods over desired
maxUnavailable: 25% # Max pods unavailable# Check current strategy
kubectl get deployment <name> -o jsonpath='{.spec.strategy}'spec:
strategy:
type: Recreate # Kill all, then create new# Deploy new version with different label
kubectl apply -f deployment-v2.yaml
# Verify v2 is healthy
kubectl get pods -l version=v2
# Switch service to v2
kubectl patch service <name> -p '{"spec":{"selector":{"version":"v2"}}}'
# Rollback: switch back to v1
kubectl patch service <name> -p '{"spec":{"selector":{"version":"v1"}}}'# Scale down main, scale up canary
kubectl scale deployment/<name>-main --replicas=9
kubectl scale deployment/<name>-canary --replicas=1
# Monitor canary metrics, then promote or rollback# Pods running?
kubectl get pods -l app=<name>
# Ready and healthy?
kubectl get deployment <name>
# Events (errors?)
kubectl get events --field-selector involvedObject.name=<deployment> --sort-by='.lastTimestamp'# Port-forward and test
kubectl port-forward deployment/<name> 8080:80 &
curl localhost:8080/health
# Or exec into pod
kubectl exec -it deployment/<name> -- curl localhost/health# Check resource usage
kubectl top pods -l app=<name>
# Compare with previous
# (Use your monitoring: Prometheus, Datadog, etc.)# Check rollout status
kubectl rollout status deployment/<name>
# Check events
kubectl describe deployment <name>
# Check pod issues
kubectl get pods -l app=<name>
kubectl describe pod <problematic-pod>| Symptom | Check | Fix |
|---|---|---|
| ImagePullBackOff | Image name/tag, registry auth | Fix image reference |
| CrashLoopBackOff | Pod logs | Fix application error |
| Pending pods | Node resources, PVC | Scale cluster or fix storage |
| Readiness probe failing | App startup time | Adjust probe timing |
# Immediate rollback
kubectl rollout undo deployment/<name>
# If that fails, scale to zero then restore from backup
kubectl scale deployment/<name> --replicas=0
kubectl apply -f deployment-backup.yaml# 1. Pre-flight
kubectl get nodes && kubectl top nodes
# 2. Backup current state
kubectl get deployment <name> -o yaml > backup.yaml
# 3. Dry-run
kubectl apply -f new-deployment.yaml --dry-run=client
# 4. Show diff
kubectl diff -f new-deployment.yaml
# 5. Apply with record
kubectl apply -f new-deployment.yaml
# 6. Watch rollout
kubectl rollout status deployment/<name> --timeout=5m
# 7. Verify health
kubectl get pods -l app=<name>
kubectl logs -l app=<name> --tail=20
# 8. If issues: rollback
kubectl rollout undo deployment/<name>~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.