helm-deploy

📁 lobbi-docs/claude 📅 1 day ago
2
总安装量
1
周安装量
#66538
全站排名
安装命令
npx skills add https://github.com/lobbi-docs/claude --skill helm-deploy

Agent 安装分布

amp 1
cline 1
opencode 1
cursor 1
continue 1
kimi-cli 1

Skill 文档

Safe Helm Deploy

Deploy via Helm with image verification: $ARGUMENTS

Pre-Deploy Checklist

  1. Verify the image exists in the registry

    # ACR
    az acr repository show-tags --name <registry> --repository <image> --orderby time_desc --top 5
    # Docker Hub
    docker manifest inspect <registry>/<image>:<tag>
    
  2. Check what’s currently running

    helm list -n <namespace>
    kubectl get pods -n <namespace> -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range .spec.containers[*]}{.image}{"\n"}{end}{end}'
    
  3. Diff the changes before applying

    helm diff upgrade <release> <chart> -n <namespace> \
      --set image.tag=<new-tag> \
      --set image.pullPolicy=Always \
      -f values.yaml
    

Deploy Command Template

helm upgrade --install <release> <chart> \
  --namespace <namespace> \
  --set image.repository=<registry>/<image> \
  --set image.tag=<specific-tag> \
  --set image.pullPolicy=Always \
  --atomic \
  --wait \
  --timeout 5m \
  -f values.yaml

Post-Deploy Verification

# Verify new pods are running
kubectl rollout status deployment/<deployment> -n <namespace>

# Verify the correct image is running
kubectl get pods -n <namespace> -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range .spec.containers[*]}{.image}{"\n"}{end}{end}'

# Check pod logs for startup errors
kubectl logs -l app=<app> -n <namespace> --tail=50

Rollback (if needed)

helm rollback <release> -n <namespace>
# Or to a specific revision:
helm history <release> -n <namespace>
helm rollback <release> <revision> -n <namespace>

Critical Rules

  • ALWAYS use --set image.tag=<specific> with a unique tag (git SHA, semver)
  • ALWAYS use --set image.pullPolicy=Always to force fresh pulls
  • ALWAYS use --atomic for automatic rollback on failure
  • ALWAYS use --wait to confirm pods are healthy
  • NEVER deploy with :latest as the only tag
  • ALWAYS verify the image exists in registry BEFORE deploying