Awesome-omni-skill kubectl
Manage the local kubernetes cluster for development. Use when the user asks to check pods, restart deployments, view logs, apply manifests, create or delete resources, or perform any kubectl/helm operation.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/backend/kubectl" ~/.claude/skills/diegosouzapw-awesome-omni-skill-kubectl && rm -rf "$T"
skills/backend/kubectl/SKILL.md- references .env files
Setup
-
Read cluster config: Read
to get:dev_env/.env
— kube context (e.g.,DATASPOKE_DEV_KUBE_CLUSTER
)docker-desktop
— DataHub namespace (e.g.,DATASPOKE_DEV_KUBE_DATAHUB_NAMESPACE
)datahub-01
— DataSpoke namespace (e.g.,DATASPOKE_DEV_KUBE_DATASPOKE_NAMESPACE
)dataspoke-01
— Example sources namespace (e.g.,DATASPOKE_DEV_KUBE_DUMMY_DATA_NAMESPACE
)dummy-data1
-
Verify prerequisites:
kubectl version --client kubectl config current-context # confirm correct context kubectl get nodes # confirm cluster access
If tools are missing or cluster is unreachable, stop and inform the user.
Execution Strategy for $ARGUMENTS
$ARGUMENTSBefore acting: identify the operation type from
$ARGUMENTS — read, create, modify, or delete.
Read operations (safe, execute immediately):
kubectl get <type> -n <namespace> kubectl describe <type> <name> -n <namespace> kubectl logs <pod> -n <namespace> --tail=100 kubectl get events -n <namespace> --sort-by='.lastTimestamp' helm status <release> -n <namespace> helm history <release> -n <namespace> helm get values <release> -n <namespace>
Create/apply operations (use dry-run first):
# Validate first kubectl apply -f <file.yaml> --dry-run=server # Then apply kubectl apply -f <file.yaml> -n <namespace>
Modify operations (confirm intent, then execute):
kubectl rollout restart deployment/<name> -n <namespace> helm upgrade <release> <chart> -n <namespace> -f <values.yaml>
Delete operations — always follow this safety workflow:
# 1. Confirm you're in the right context kubectl config current-context # 2. Describe before deleting kubectl describe <type> <name> -n <namespace> # 3. Delete kubectl delete <type> <name> -n <namespace> # 4. Verify kubectl get <type> -n <namespace>
Never delete namespaces. For scale-to-zero or namespace-level destructive operations, confirm with the user first.
Report Results
After every operation, summarize:
- What was executed
- What changed (before/after state if relevant)
- Any warnings, errors, or events triggered
- Suggested next steps if issues are found
For errors, consult reference.md for common causes and resolutions.
See reference.md for helm chart management, resource creation patterns, capacity planning, and error reference.