aks-deployment-troubleshooter
Diagnose and fix Kubernetes deployment failures, especially ImagePullBackOff, CrashLoopBackOff, and architecture mismatches. Battle-tested from 4-hour AKS…
от mjunaidca★ 27 звёзд на GitHub
Установить aks-deployment-troubleshooter в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
AKS Deployment Troubleshooter
Overview
This skill captures systematic approaches to debugging Kubernetes deployments, with specific focus on container image issues. Based on real debugging session resolving 10+ different failure modes.
When to Use
- Pods stuck in
ImagePullBackOff - Pods in
CrashLoopBackOffwithexec format error - "no match for platform in manifest" errors
- Image registry authentication issues
- Helm deployment timeouts
Quick Diagnosis Flow
Pod not running?
│
├─► ImagePullBackOff
│ │
│ ├─► "not found" ──► Wrong tag or registry path
│ ├─► "unauthorized" ──► Auth/imagePullSecrets issue
│ └─► "no match for platform" ──► Architecture mismatch
│
├─► CrashLoopBackOff
│ │
│ ├─► "exec format error" ──► Wrong CPU architecture
│ ├─► Exit code 1 ──► App startup failure (check logs)
│ └─► OOMKilled ──► Memory limits too low
│
└─► Pending
│
├─► Insufficient CPU/memory ──► Scale cluster or reduce requests
└─► No matching node ──► Check nodeSelector/tolerations
Diagnostic Commands
Step 1: Get Pod Status
kubectl get pods -n <namespace>
Step 2: Describe Failing Pod
kubectl describe pod <pod-name> -n <namespace> | grep -E "(Image:|Failed|Error|pull)"
Step 3: Check Events
kubectl get events -n <namespace> --sort-by='.lastTimestamp' | tail -20
Step 4: Check Logs (for CrashLoopBackOff)
kubectl logs <pod-name> -n <namespace> --tail=50
Step 5: Check Node Architecture
kubectl get nodes -o jsonpath='{.items[*].status.nodeInfo.architecture}'
Error Resolution Guide
1. ImagePullBackOff: "not found"
Error:
Failed to pull image "ghcr.io/owner/repo/app:abc123": not found
Causes & Solutions:
| Cause | Solution |
|---|---|
| Tag doesn't exist | Verify image was pushed with exact tag |
| Short vs full SHA | Align metadata-action with deploy (use type=raw,value=${{ github.sha }}) |
| Builds skipped | Manual trigger or remove path filters |
| Wrong registry | Check image.repository in Helm values |
Diagnostic:
# Check what tags exist (requires gh cli and package visibility)
gh api /users/<owner>/packages/container/<package>/versions
2. ImagePullBackOff: "unauthorized"
Error:
failed to authorize: failed to fetch anonymous token: 401 Unauthorized
Causes & Solutions:
| Cause | Solution |
|---|---|
| Package is private | Make package public in GHCR settings |
| Missing imagePullSecrets | Create docker-registry secret |
| Wrong credentials | Regenerate and update secret |
Create imagePullSecrets:
kubectl create secret docker-registry ghcr-secret \
--docker-server=ghcr.io \
--docker-username=<github-username> \
--docker-password=<github-token> \
--namespace=<namespace>
Link secret in deployment:
spec:
imagePullSecrets:
- name: ghcr-secret
3. ImagePullBackOff: "no match for platform in manifest"
Error:
no match for platform in manifest: not found
Root Cause: Image built for wrong CPU architecture OR buildx provenance issue.
Step 1: Check cluster architecture:
kubectl get nodes -o jsonpath='{.items[*].status.nodeInfo.architecture}'
# Output: amd64 amd64 OR arm64 arm64
Step 2: Match build platform:
# In GitHub Actions docker/build-push-action
- uses: docker/build-push-action@v5
with:
platforms: linux/arm64 # or linux/amd64
provenance: false # CRITICAL: Disable attestation manifests
no-cache: true # Force fresh build
Why provenance: false?
Buildx creates multi-arch manifest lists with attestations. Some container runtimes can't find the actual image in complex manifests. Disabling provenance creates simple single-platform images.
4. CrashLoopBackOff: "exec format error"
Error:
exec /usr/local/bin/docker-entrypoint.sh: exec format error
Root Cause: Binary architecture doesn't match node architecture.
Example: Built linux/amd64 image, deployed to arm64 nodes.
Solution:
- Check node architecture:
kubectl get nodes -o jsonpath='{.items[*].status.nodeInfo.architecture}' - Update build platform to match
- Rebuild WITHOUT cache (cached layers may have wrong arch)
platforms: linux/arm64 # Match your cluster!
no-cache: true # Force complete rebuild
provenance: false # Simple manifest
5. Helm --set Comma Parsing Error
Error:
failed parsing --set data: key "com" has no value (cannot end with ,)
Root Cause: Helm interprets commas as array separators in --set.
Wrong:
--set "origins=https://a.com,https://b.com"
Solution: Use heredoc values file:
# In GitHub Actions
- name: Deploy
run: |
cat > /tmp/overrides.ya
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл aks-deployment-troubleshooter?
Diagnose and fix Kubernetes deployment failures, especially ImagePullBackOff, CrashLoopBackOff, and architecture mismatches. Battle-tested from 4-hour AKS debugging session with 10+ failure modes resolved.
Как установить скилл aks-deployment-troubleshooter?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл aks-deployment-troubleshooter запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…