kubectl চিটশিট
Kubernetes 1.30+-এ pod, deployment, service পরীক্ষা, লগ, exec ডিবাগিং, রোলআউট, কনটেক্সট এবং JSONPath কোয়েরির জন্য Kubernetes CLI কমান্ড।
যেভাবে কাজ করে
kubectl reads and reconciles declarative resource manifests against the API server: `get`/`describe`/`logs` diagnose state, while `apply`/`rollout` safely drive cluster changes.
সারভাইভাল কিট
যে কয়েকটি কমান্ড সবার আগে শিখতে হবে।
৪২টি কমান্ড
Contexts, Namespaces & Discovery
Verify which cluster and namespace you target before reading or changing state.
- অপরিহার্য
Print the currently active cluster context before running commands
kubectl config current-contextকখন ব্যবহার করবেন
Prevents accidentally running dev commands against a production cluster.
উদাহরণ
kubectl config current-context
Inspect, Logs & Events
Diagnose CrashLoopBackOff, ImagePullBackOff, pending pods, and probe failures.
Shell, Port-Forward & Copy
Connect to cluster services locally, exec into pods, and transfer files.
Apply, Dry-Run & Rollouts
Validate manifests safely, watch rollouts, scale, and roll back cleanly.
Nodes, RBAC & Cleanup
Verify permissions, check resource usage, cordon nodes, and clean pods.