---
name: deploy-56e90ac79a8c
description: |
  Infrastructure deployment verification workflow. Use when: (1) Pushing infrastructure/config changes,
  (2) Deploying to Kubernetes, (3) User says "deploy", "rollout", "verify deployment",
  (4) After committing Helm/K8s/Hydra/Kratos YAML changes, (5) Need to check deployment status.
---

# Deploy Verification Workflow

## Pre-Deploy Checklist

1. **Validate configs** before committing:
   - YAML syntax: `python3 -c "import yaml; yaml.safe_load(open('FILE'))"`
   - K8s manifests: `kubectl apply --dry-run=client -f <file>`
   - Helm: `helm template <chart> | kubectl apply --dry-run=client -f -`
   - Cross-check service-specific keys (don't mix Hydra/Kratos/other service configs)

2. **Build verification** (if applicable):
   - `go build ./...` or `make build`
   - `go vet ./...`
   - Run tests: `make test` or `go test ./...`

## Deploy Steps

1. Stage and commit changes with conventional commit format
2. Push to current branch
3. Verify deployment:

```bash
# Check rollout status with timeout
kubectl rollout status deployment/<name> -n <namespace> --timeout=120s

# If flaky connectivity, retry with backoff
for i in 1 2 3; do
  kubectl rollout status deployment/<name> -n <namespace> --timeout=60s && break
  echo "Retry $i/3... waiting 15s"
  sleep 15
done
```

## Post-Deploy Verification

```bash
# Check pods are healthy
kubectl get pods -n <namespace> -l app=<name>

# Check recent logs for errors
kubectl logs -n <namespace> deployment/<name> --tail=50 --since=2m

# Smoke test (if endpoint available)
curl -sf https://<endpoint>/health
```

## Connectivity Failure Protocol

If kubectl is unreachable after 3 retries:
1. Document in commit/PR: "UNVERIFIED: kubectl connectivity failed at $(date)"
2. Create a verification script the user can run later:
   ```bash
   kubectl rollout status deployment/<name> -n <namespace>
   kubectl get pods -n <namespace> -l app=<name>
   ```
3. Inform the user clearly that manual verification is needed

## Common Pitfalls

| Issue | Cause | Fix |
|-------|-------|-----|
| Wrong config keys | Copied from wrong service | Validate top-level keys match target service |
| ImagePullBackOff | Wrong image tag/registry | Check image exists: `docker manifest inspect <image>` |
| CrashLoopBackOff | Config or code error | Check logs: `kubectl logs <pod> --previous` |
| Pending pods | Resource constraints | Check events: `kubectl describe pod <pod>` |


---
Source attribution: zach-source
Original project: https://github.com/zach-source/claude-plugins/blob/61adbbc283466a1755a493153bfe79e7df2bdf77/plugins/devops/skills/deploy/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2025 Zach Taylor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: zach-source
Original project: https://github.com/zach-source/claude-plugins/blob/61adbbc283466a1755a493153bfe79e7df2bdf77/plugins/devops/skills/deploy/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: Backend Developer, DevOps / SRE, Technical Product Manager
Specialties: Backend, DevOps
Tools: Docker, Kubernetes
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 4d7e56248e0d8a20156b8f357fcfbd580746b3a800d87e63da3204450682b799
