Member-only story
My Kubernetes maintenance cheatsheet
A Handy Cheatsheet of the Most Useful Kubernetes Commands for Maintenance
Kubernetes has become the de facto standard for container orchestration and management, providing powerful tools for deploying, scaling, and managing containerized applications. However, as with any complex system, it can be challenging to keep a Kubernetes cluster running smoothly and troubleshoot issues as they arise. Fortunately, Kubernetes provides a rich set of command-line tools that can help you diagnose and fix problems quickly and efficiently. In this blog post, we’ll highlight the top 10 Kubernetes commands that every Kubernetes administrator or developer should have in their toolbox for maintaining their cluster. From monitoring pods to scaling deployments, these commands will help you keep your cluster running at peak performance and avoid downtime. Let’s dive in!
kubectl get pods
- displays a list of all pods running in the cluster.kubectl describe pod <pod-name>
- provides detailed information about a specific pod.kubectl logs <pod-name>
- displays the logs for a specific pod.kubectl exec -it <pod-name> -- <command>
- allows you to execute a command inside a container running in a pod.kubectl delete pod <pod-name>
- deletes a specific pod.kubectl rollout status deployment/<deployment-name>
- displays the status of a deployment rollout.kubectl scale deployment <deployment-name>
…