kubectl operations for applying, patching, deleting, and executing commands on Kubernetes resources. Use when modifying resources, running commands in pods, or managing resource lifecycle.
Execute kubectl commands using kubectl-mcp-server's operations tools.
Use this skill when:
| Priority | Rule | Impact | Tools |
|---|---|---|---|
| 1 | Dry run before apply in production | CRITICAL | kubectl_apply(dry_run=True) |
| 2 | Check current state before patching | HIGH | describe_* tools |
| 3 | Avoid force delete unless necessary | HIGH | kubectl_delete |
| 4 | Verify rollout status after changes | MEDIUM | kubectl_rollout_status |
| Task | Tool | Example |
|---|---|---|
| Apply manifest | kubectl_apply | kubectl_apply(manifest=yaml) |
| Patch resource | kubectl_patch | kubectl_patch(type, name, namespace, patch) |
| Delete resource | kubectl_delete | kubectl_delete(type, name, namespace) |
| Exec command | kubectl_exec | kubectl_exec(pod, namespace, command) |
| Scale deployment | scale_deployment | scale_deployment(name, namespace, replicas) |
kubectl_apply(manifest="""
apiVersion: apps/v1