shepherdjerred/monorepo/kubectl-helper
Claude Code and agent skill by shepherdjerred/monorepo
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Kubernetes troubleshooting and resource management with kubectl When user works with Kubernetes, mentions kubectl, pods, deployments, or k8s errors
Install
npx vskill@latest install shepherdjerred/monorepo/kubectl-helperSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Kubernetes Helper Agent
What's New in Kubernetes 1.33 & 2025
- Server-Side Apply: Recommended default for applying manifests (better conflict resolution)
- Server-Side Dry Run: Full API validation before applying changes
- kubectl diff: Preview changes before applying
- Containerd Default: containerd is now the default runtime (Docker deprecated)
- Enhanced Label Selectors: More powerful filtering and bulk operations
- Rollout Control: Better manual control with
kubectl rollout pause
Overview
This agent helps you work with Kubernetes clusters using kubectl for resource management, troubleshooting, and debugging.
CLI Commands
Auto-Approved Commands
The following kubectl commands are auto-approved and safe to use:
kubectl get- List resourceskubectl describe- Show detailed resource informationkubectl logs- View container logskubectl explain- Show resource documentationkubectl api-resources- List available resource typeskubectl version- Show version informationkubectl cluster-info- Display cluster informationkubectl config- Manage kubeconfigkubectl top- Show resource usage
Modern Apply Patterns (2025)
Server-side apply (recommended):
Preview changes before applying:
Why server-side apply?
- Better conflict resolution (server decides, not client)
- Supports collaborative editing (multiple sources can manage same resource)
- Respects field ownership (who owns each field)
- Required for some newer Kubernetes features
Common Operations
Get resources:
Advanced label selectors (2025):
Describe resources:
View logs:
Context and namespace management:
Rollout management and canary deployments:
Canary deployment workflow:
Troubleshooting Workflows
Pod Not Starting
Debugging Running Pod
Network Issues
Resource Constraints
Common Patterns
Get Resource in Specific Format
Filtering and Selecting
Watch Resources
Best Practices and Smart Defaults (2025)
Infrastructure as Code
- Always use version control for manifests:
```bash # Good: Manifests in git git add k8s/ git commit -m "Update deployment replicas" kubectl apply -f k8s/ --server-side
# Bad: Imperative changes (lost on next apply) kubectl scale deployment my-app --replicas=5 ```
- Prefer server-side apply for all manifest applications
``bash # Default to server-side kubectl apply -f . --server-side --recursive ``
- Preview changes before applying:
``bash # Always diff first kubectl diff -f deployment.yaml # Then apply kubectl apply -f deployment.yaml --server-side ``
- Use kubectl diff as pre-commit hook:
``bash # .git/hooks/pre-commit kubectl diff -f k8s/ --exit-code ``
Runtime Notes (K8s 1.33)
- Containerd is now the default runtime (Docker deprecated since 1.20)
- If using Docker, migrate to containerd or CRI-O
- Docker shim removed entirely in 1.33+
Security Best Practices
- Use Namespaces: Isolate workloads with namespaces
- RBAC: Follow principle of least privilege
- Network Policies: Restrict pod-to-pod communication
- Resource Limits: Always set memory and CPU limits
``yaml resources: limits: memory: "256Mi" cpu: "500m" requests: memory: "128Mi" cpu: "250m" ``
- Security Contexts: Run containers as non-root when possible
``yaml securityContext: runAsNonRoot: true runAsUser: 1000 readOnlyRootFilesystem: true ``
- Secrets: Use Kubernetes Secrets, never hardcode credentials
- Label Consistency: Use consistent labels for filtering and RBAC
``yaml labels: app: nginx env: production version: v1.2.3 ``
Common Issues and Solutions
ImagePullBackOff
CrashLoopBackOff
Pending Pods
Examples
Example 1: Complete Pod Debugging
Example 2: Find Pods Using Most Resources
Example 3: Quick Health Check
Advanced Operations
Bulk Operations
Debug with Ephemeral Containers
When to Ask for Help
Ask the user for clarification when:
- The cluster context or namespace is ambiguous
- Destructive operations are needed (delete, drain, cordon)
- RBAC permissions might be insufficient
- The issue requires changes to cluster configuration
- Multiple pods/deployments match the criteria
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/dotfiles/dot_agents/skills/kubectl-helper/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shepherdjerred/monorepo/kubectl-helper)