k8s-ops
Skill44 starsChanged 7 months agoApache-2.0View on GitHub
Manage Kubernetes cluster resources via kubectl. Use when user needs to view, troubleshoot, or modify K8s workloads across multiple clusters.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- nb-99/skillektiontheir own version, first seen Aug 19, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- nb-99/skillektion★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- architectSkill
- clean-cacheSkill
- code-reviewSkill
- code-submitSkill
- dev-workflowSkill
- doc-writingSkill
- embed-ci-setupSkill
- gitlab-ciSkill
- gitlab-mrSkill
- grafanaSkill
- local-security-checkSkill
- mock-engineSkill
- multi-worktree-devSkill
- prometheusSkill
- security-compliance-reviewSkill
- sentry-onboardingSkill
- sentrySkill
- sre-agentSkill
- story-craftsmanSkill
- terraform-auditSkill
- testing-strategySkill
- trufflehog-cliSkill
- uat-story-writerSkill
- voc-analysisSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Before using this skill, configure your cluster contexts in the table below.
- Very specific: line 35
Run kubectl version --client to confirm kubectl is installed
- Very specific: line 36
Run kubectl config get-contexts to list configured contexts
- Very specific: line 53
Target namespace: Use default if not specified, or infer from the service name
- Very specific: line 58
Use the --context parameter to specify the cluster — do not modify the current default context:
- Distinctive: line 130
Change operations: Verify results after execution (e.g., check Pod count after scale, check rollout status after restart)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
k8s-ops
Assists operations engineers in managing K8s cluster resources via kubectl. Supports viewing, troubleshooting, and change operations.
Applicable scenarios:
- View Pod/Deployment/Service/Node and other resource statuses
- View logs and events for troubleshooting
- Execute change operations (scale, rollout restart, apply, etc.)
- Troubleshooting operations (exec, port-forward, describe, etc.)
Setup
Before using this skill, configure your cluster contexts in the table below. Replace the example entries with your actual clusters:
| Cluster | Context | Cloud Provider | k8s Repo Directory |
| prod-1 | your-eks-context-here | AWS EKS | clusters/prod-1/ |
| staging | your-gke-context-here | GCP GKE | clusters/staging/ |
| dev | your-aks-context-here | Azure AKS | clusters/dev/ |
Add all clusters your team manages. The context value should match the output of
kubectl config get-contexts.
Execution Flow
Step 1: Environment Check
On first operation, the Agent should automatically check the environment:
- Run
kubectl version --clientto confirm kubectl is installed - Run
kubectl config get-contextsto list configured contexts
If kubectl is not installed: Guide the user to install it (brew install kubectl / apt install kubectl / official documentation).
If the target context is not configured:
- AWS EKS clusters: Guide the user to run
aws eks update-kubeconfig --name <cluster-name> --region <region> - GCP GKE clusters: Guide the user to run
gcloud container clusters get-credentials <cluster-name> --region <region> --project <project>, and ensuregke-gcloud-auth-pluginis installed - Azure AKS clusters: Guide the user to run
az aks get-credentials --resource-group <rg> --name <cluster-name> - Other clusters: Guide the user to download kubeconfig through the corresponding cloud platform console
If already configured: Proceed directly to Step 2.
Step 2: Confirm Operation Target
Confirm the following information with the user (proactively ask if not provided):
- Target cluster: Match the cluster table above based on the user's description; determine the context
- Target namespace: Use
defaultif not specified, or infer from the service name - Operation content: View, change, troubleshoot, etc.
Step 3: Switch Context
Use the --context parameter to specify the cluster — do not modify the current default context:
kubectl --context <context-name> -n <namespace> <command>Step 4: Execute Operation
View Operations (execute directly)
View operations carry no risk and can be executed directly:
# View Pod status
kubectl --context <ctx> -n <ns> get pods
# View Deployments
kubectl --context <ctx> -n <ns> get deployments
# View Pod logs
kubectl --context <ctx> -n <ns> logs <pod-name> --tail=100
# View events
kubectl --context <ctx> -n <ns> get events --sort-by='.lastTimestamp'
# View resource details
kubectl --context <ctx> -n <ns> describe pod <pod-name>
# View Node status
kubectl --context <ctx> get nodes
# View resource usage
kubectl --context <ctx> -n <ns> top podsChange Operations (must confirm first)
All change operations must show the user the command to be executed; execution only after user confirmation.
# Scale
kubectl --context <ctx> -n <ns> scale deployment <name> --replicas=<N>
# Rolling restart
kubectl --context <ctx> -n <ns> rollout restart deployment <name>
# Apply configuration
kubectl --context <ctx> -n <ns> apply -f <file>
# Edit ConfigMap
kubectl --context <ctx> -n <ns> edit configmap <name>
# Delete resource (high risk)
kubectl --context <ctx> -n <ns> delete <resource> <name>Troubleshooting Operations
# Enter a container
kubectl --context <ctx> -n <ns> exec -it <pod-name> -- /bin/sh
# Port forwarding
kubectl --context <ctx> -n <ns> port-forward <pod-name> <local>:<remote>
# View all containers in a Pod
kubectl --context <ctx> -n <ns> get pod <pod-name> -o jsonpath='{.spec.containers[*].name}'Step 5: Confirm Results
- View operations: Display output directly; format or summarize as needed
- Change operations: Verify results after execution (e.g., check Pod count after scale, check rollout status after restart)
- On failure: Display error information, analyze the cause, and suggest a fix
Security Rules
- Prohibit executing
delete namespaceon prod clusters - Prohibit executing
kubectl drainunless the user explicitly requests and confirms - All change operations must show the complete command before execution and wait for user confirmation
- Batch operations (e.g., scaling multiple deployments simultaneously) must list each one and confirm
- Prefer using
--contextparameter to specify the cluster; avoidkubectl config use-contextwhich modifies global state
Examples
Bad
1. Executing changes without confirmation
User: Help me restart payment-service on Production
AI: Rolling restart executed.Problem: Change operation executed without user confirmation.
2. Modifying global context
kubectl config use-context my-prod-context
kubectl -n prod get podsProblem: Modified the global context, potentially affecting the user's other terminal sessions. Should use the --context parameter.
3. Executing high-risk operations on prod without confirmation
kubectl --context my-prod-context delete namespace monitoringProblem: Deleting an entire namespace on a production cluster without confirmation.
Good
1. Confirming before changes
User: Help me restart payment-service on Prod
AI: I will execute the following on the Prod cluster:
- Cluster: prod-1 (my-prod-context)
- Namespace: prod
- Command: kubectl --context my-prod-context -n prod rollout restart deployment payment-service
Confirm execution?
User: Confirmed
AI: Executed. Checking rollout status...
deployment "payment-service" successfully rolled out2. Guiding configuration after environment check
User: Help me check the Pod status on Staging
AI: Let me check the kubectl environment...
kubectl is installed (v1.28.2)
But the Staging context was not found. Please run the following command to configure it:
aws eks update-kubeconfig --name staging-cluster --region <your-region>
Let me know when configuration is complete, and I will continue.3. Troubleshooting flow
User: The api-gateway on Staging keeps CrashLoopBackOff
AI: Let me investigate:
1. Checking Pod status...
NAME READY STATUS RESTARTS AGE
api-gateway-5d4f6c7b8-x2k9z 0/1 CrashLoopBackOff 5 10m
2. Checking recent logs...
Error: failed to connect to database at <ip>:5432
3. Checking events...
Back-off restarting failed container
Analysis: Pod cannot connect to database at <ip>:5432. Recommended checks:
- Is the database service running normally
- Is a NetworkPolicy blocking the connection
- Is the database address correct in the ConfigMap/SecretExemptions
| Scenario | Condition |
| Emergency incident recovery | User explicitly states an emergency — confirmation steps may be skipped |
| Non-managed clusters | User provides a context not in the Setup list above |
Exemption method: /override skill=k8s-ops reason="emergency incident recovery"
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

