kubernetes-deployment-validator
БесплатноБез исполняемых скриптовНе проверенValidate Kubernetes deployments before execution. Run pre-flight checks for password generation, environment variables, database authentication, CORS…
от mjunaidca★ 27 звёзд на GitHubОб этом скилле
Kubernetes Deployment Validator
Pre-flight validation checks for Kubernetes deployments to prevent common configuration errors and deployment failures.
When to Use
ALWAYS run BEFORE:
helm installorhelm upgrade- Kubernetes deployment scripts
- Configuration changes to production/staging
- Migration from docker-compose to Kubernetes
Validation Checklist
1. Password Generation Strategy
What to Check:
- Password encoding method (hex vs base64)
- Special characters that need URL-encoding
- PostgreSQL authentication compatibility
Validation:
# Test password generation
PASSWORD=$(openssl rand -hex 16)
echo "Generated password: $PASSWORD"
# Check for URL-encoding issues (should have NONE with hex)
echo "$PASSWORD" | grep -E '[+/=]' && echo "❌ FAIL: Special chars found" || echo "✅ PASS: Alphanumeric only"
# Test with PostgreSQL
echo "Testing PostgreSQL authentication with generated password..."
PGPASSWORD="$PASSWORD" psql -h localhost -p 5432 -U test_user -d postgres -c "SELECT 1;"
Pass Criteria:
- ✅ Uses
openssl rand -hex(alphanumeric only) - ✅ No special characters:
+,/,= - ✅ Works with psql, asyncpg, and postgres.js
Fail Indicators:
- ❌ Uses
openssl rand -base64(contains special chars) - ❌ Password contains URL-encoding characters
- ❌ Password works in psql but fails in application
Fix:
# Wrong
POSTGRES_PASSWORD=$(openssl rand -base64 16) # ❌ Can generate: xK+3/zA9=mQ2pL1w
# Right
POSTGRES_PASSWORD=$(openssl rand -hex 16) # ✅ Always generates: dadaf807863a952b
2. Environment Variable Flow
What to Check: Complete path from .env → Helm → ConfigMap/Secret → Pod → Application
Validation:
# Check .env file
echo "📄 Checking .env file..."
grep -E "(SMTP_|EMAIL_|NODE_ENV|ALLOWED_ORIGINS)" .env
# Simulate Helm deployment (dry-run)
echo "🎯 Checking Helm values..."
helm template taskflow ./helm/taskflow --set sso.smtp.password="test" | grep -A5 ConfigMap
# Verify variables would reach pod
echo "🔍 Checking environment injection..."
helm template taskflow ./helm/taskflow | grep -E "(SMTP|NODE_ENV|ALLOWED_ORIGINS)" | head -20
Pass Criteria:
- ✅ .env contains all required variables
- ✅ Helm values.yaml references env vars
- ✅ ConfigMap includes non-sensitive variables
- ✅ Secrets include sensitive variables
- ✅ Deployment injects both ConfigMap and Secrets
Fail Indicators:
- ❌ Variables in .env but not in values.yaml
- ❌ Sensitive vars in ConfigMap instead of Secret
- ❌ Deployment doesn't reference ConfigMap/Secret
- ❌ Variable names mismatch between layers
Fix:
# 1. Add to values.yaml
sso:
smtp:
enabled: true
host: smtp.gmail.com
password: changeme # Override with --set
# 2. Add to ConfigMap (non-sensitive)
data:
SMTP_HOST: {{ .Values.sso.smtp.host }}
# 3. Add to Secret (sensitive)
stringData:
SMTP_PASS: {{ .Values.sso.smtp.password }}
# 4. Inject in Deployment
envFrom:
- configMapRef:
name: sso-config
env:
- name: SMTP_PASS
valueFrom:
secretKeyRef:
name: sso-secret
key: SMTP_PASS
3. Database Authentication Configuration
What to Check:
- Secret password matches database password
- Connection string format correct
- Authentication mode compatible with client libraries
Validation:
# Get password from Secret
SECRET_PASSWORD=$(kubectl get secret sso-postgres-secret -n taskflow -o jsonpath='{.data.POSTGRES_PASSWORD}' | base64 -d 2>/dev/null || echo "none")
# Test connection with Secret password
echo "Testing database connection with Secret password..."
PGPASSWORD="$SECRET_PASSWORD" psql -h localhost -p 5432 -U sso_user -d sso_db -c "SELECT 1;" 2>&1
# Check for auth errors
kubectl logs -n taskflow -l app.kubernetes.io/component=sso --tail=50 | grep -i "password authentication failed"
Pass Criteria:
- ✅ Secret password works with psql
- ✅ Secret password works with application client (asyncpg/postgres.js)
- ✅ No "password authentication failed" errors in logs
- ✅ Connection string format correct for client library
Fail Indicators:
- ❌ psql works but application fails
- ❌ "password authentication failed" errors
- ❌ Secret password ≠ database password
- ❌ Connection string has URL-encoding issues
Fix:
# Reset database password to match Secret
PASSWORD=$(kubectl get secret sso-postgres-secret -n taskflow -o jsonpath='{.data.POSTGRES_PASSWORD}' | base64 -d)
kubectl exec -n taskflow sso-postgres-0 -- sh -c "
PGPASSWORD='old_password' psql -U sso_user -d postgres -c \"ALTER USER sso_user WITH PASSWORD '$PASSWORD';\"
"
# Restart application pods
kubectl delete pod -n taskflow -l app.kubernetes.io/component=sso
4. CORS Configuration (Better Auth)
What to Check:
- NODE_ENV matches environment (dev vs prod)
- BETTER_AUTH_URL matches actual access URL
- ALLOWED_ORIGINS includes all tenant app URLs
- OAuth callback URLs use correct protocol
Validation: ```ba
Установить kubernetes-deployment-validator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл kubernetes-deployment-validator?
Validate Kubernetes deployments before execution. Run pre-flight checks for password generation, environment variables, database authentication, CORS configuration, and docker-compose parity. Use this skill BEFORE every Helm install/upgrade to prevent deployment failures.
Как установить скилл kubernetes-deployment-validator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл kubernetes-deployment-validator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub