What problem does it solve?
Kubernetes cluster management with kubectl can be error-prone and time-consuming without a guided workflow. This skill provides a clear, safe routine to perform common operations using kubectl, with emphasis on context and namespace safety.
Core Features & Use Cases
- Context-aware operations: Verify and switch contexts and namespaces before running commands.
- Resource inspection and management: List, describe, and troubleshoot pods, deployments, services, ConfigMaps, and Secrets.
- Deployment and scaling: Update images, scale replicas, and monitor rollouts.
- Troubleshooting and diagnostics: Retrieve logs, events, and status to diagnose issues quickly.
- Use Case: For a multi-namespace workflow in a production environment, ensure all kubectl actions target the correct namespace to avoid cross-namespace impact.
Quick Start
Start by validating access to your cluster with kubectl cluster-info and kubectl get nodes, then set your context and namespace as needed. For example: kubectl config set-context <context-name> --namespace=<namespace> and kubectl get pods -n <namespace>.