skills/k8s-planning/SKILL.md
Interactive Kubernetes deployment planning through Q&A-based scenario extraction. Use when users want to design K8s architecture, plan microservice deployments, define manifests, ConfigMaps, Secrets, Services, RBAC, or Network Policies. Guides users through structured decision-making to generate consistent deployment documentation.
npx skillsauth add alijilani-dev/claude k8s-planningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides a structured workflow for guiding users through Kubernetes deployment planning via interactive Q&A. It ensures consistent decision-making and generates comprehensive deployment documentation.
Trigger conditions:
Guide users through 5 stages:
Understand the system architecture before making any K8s decisions.
App Count & Names: How many applications/microservices need deployment?
App Descriptions: For each app, ask:
Communication Patterns:
Data Requirements:
| App | Description | Stateless/Stateful | Endpoints | Communicates With |
|-----|-------------|-------------------|-----------|-------------------|
Determine which Kubernetes resource types are needed based on app characteristics.
| If App Is... | Use Workload Type | Rationale | |--------------|-------------------|-----------| | Stateless service | Deployment | Rolling updates, easy scaling | | Stateful (database) | StatefulSet | Stable network IDs, ordered deployment | | Node-level daemon | DaemonSet | Runs on every node | | One-time task | Job | Run to completion | | Scheduled task | CronJob | Periodic execution |
Workloads: For each app, confirm workload type based on stateless/stateful nature
Networking:
Storage:
Configuration:
| Category | Manifest Type | Count | Justification |
|----------|--------------|-------|---------------|
| Workloads | Deployment | X | ... |
| Discovery & Networking | Service | X | ... |
Design ConfigMaps and Secrets with clear separation of concerns.
| Data Type | Resource | Example |
|-----------|----------|---------|
| Service URLs | ConfigMap | BACKEND_API_URL=http://backend-svc:8080 |
| Feature flags | ConfigMap | ENABLE_FEATURE_X=true |
| Log levels | ConfigMap | LOG_LEVEL=info |
| API keys | Secret | LLM_API_KEY=sk-xxx |
| Database credentials | Secret | DB_PASSWORD=xxx |
| TLS certificates | Secret (type: kubernetes.io/tls) | tls.crt, tls.key |
| Connection strings with passwords | Secret | DATABASE_URL=postgres://user:pass@host |
For each app:
ConfigMaps:
| ConfigMap Name | Environment Variables | Justification |
|----------------|----------------------|---------------|
Secrets:
| Secret Name | Data Type | Keys | Security Approach | Justification |
|-------------|-----------|------|-------------------|---------------|
Design service discovery, external access, and network security.
| Scenario | Service Type | Rationale | |----------|--------------|-----------| | Internal-only communication | ClusterIP | Default; no external exposure | | External access (cloud LB) | LoadBalancer | Direct cloud LB provisioning | | External access (shared entry) | ClusterIP + Ingress | Centralized TLS, path-based routing | | Access from outside cluster (dev) | NodePort | Simple but not for production | | External DNS name | ExternalName | Alias to external service |
Default to ClusterIP for all services unless there's a specific justification for external exposure. Use a single Ingress for external access to minimize attack surface.
Services:
| Service Name | Type | Justification |
|--------------|------|---------------|
Ingress:
| Host | Path | Backend Service | Description |
|------|------|-----------------|-------------|
Network Policies:
| Policy Name | Pod Selector | Ingress From | Egress To | Justification |
|-------------|--------------|--------------|-----------|---------------|
Design minimal-privilege access control with small blast-radius.
| Requirement | Solution | When to Use | |-------------|----------|-------------| | Basic pod identity | ServiceAccount only | Apps don't need K8s API access | | ConfigMap/Secret read | Role + RoleBinding | Apps need to read config | | Cross-namespace access | ClusterRole + ClusterRoleBinding | Avoid unless absolutely necessary | | Policy enforcement | OPA/Gatekeeper | Complex policies beyond RBAC |
Always prefer namespace-scoped (Role) over cluster-scoped (ClusterRole). Each app should have its own ServiceAccount with only the permissions it needs.
RBAC Artifacts:
| Type | Name | Scope | Justification |
|------|------|-------|---------------|
| ServiceAccount | xxx-sa | Namespace | ... |
| Role | xxx-role | Namespace | ... |
| RoleBinding | xxx-rb | Namespace | ... |
Role Permissions:
| Resource | Verbs | Justification |
|----------|-------|---------------|
After completing all stages, generate a comprehensive Plan.md with:
Ensure these principles are applied consistently throughout planning:
| Principle | Default Decision | |-----------|------------------| | Internal Communication | ClusterIP | | External Exposure | Single Ingress | | Secrets Management | K8s Secrets + encryption at rest | | RBAC Scope | Namespace-scoped (Role/RoleBinding) | | Workload Type | Deployment (unless stateful) | | Namespace Strategy | Single namespace per application domain |
User: I want to deploy a task management app with a frontend, backend API, and an AI agent.
Assistant: Let me help you plan the Kubernetes deployment. I'll guide you through 5 stages to ensure consistent decisions.
Stage 1: Application Discovery
I see you have 3 apps. Let me ask a few questions:
[Continue through all 5 stages...]
data-ai
Orchestrate complex tasks by delegating work to parallel subagent teams, preserving the main context window and preventing auto-compact. This skill should be used when users ask to apply subagent-teams, when performing complex multi-step tasks, when context window is getting large, or when independent subtasks can run in parallel.
development
Generate new Claude Code skills with proper structure and standards. Use when the user requests skill creation, wants to generate a new skill, or mentions creating custom Claude Code functionality. Activated by phrases like "create a skill", "generate a skill", "make a new skill", or "build a skill for".
testing
Generate comprehensive educational quizzes based on Bloom's Taxonomy methodology (Remember, Understand, Apply, Analyze, Evaluate, Create). Creates structured True/False quizzes with detailed answer keys and explanations. Use when user requests quiz generation, assessment creation, test materials, practice questions, mentions Bloom's Taxonomy, or provides educational topics for quiz creation. Activates for study topics, course materials, reference files (.md, .txt, .pdf), or educational content requiring systematic assessment.
content-media
Generate comprehensive educational notes using Bloom's Taxonomy methodology. Creates structured learning materials with summaries, practice questions, and visual diagrams. Use when user requests notes generation, study materials, learning resources, mentions Bloom's Taxonomy, or provides topics for educational note-taking. Activates for .md files, study topics, course materials, or educational content creation.