?? Daily Kubernetes Commands You Need to Know! ??
Abhishek kumar
Serving Notice Period || AWS || DevOps || Jenkins || Docker || Kubernetes || Terraform || Argo CD || Shell Scripting
Keep your Kubernetes management sharp with these essential kubectl commands! Here’s a quick reference to boost your efficiency: ??
1. kubectl get Purpose: List all resources in the cluster
?? kubectl get pods /services /deployments ???
2. kubectl describe Purpose: Obtain detailed information about a resource
?? kubectl describe pod <pod-name> /service <service-name> /deployment <deploymentname> ??
3. kubectl logs Purpose: Retrieve logs from a Pod
?? kubectl logs <pod-name>
?? kubectl logs <pod-name> -c <container-name> (for multi-container Pods) ??
4. kubectl exec Purpose: Execute commands within a container
?? kubectl exec -it <pod-name> -- /bin/bash ???
5. kubectl apply Purpose: Apply configuration changes from a file
?? kubectl apply -f <file.yaml> ??
6. kubectl delete Purpose: Remove resources
?? kubectl delete pod <pod-name>
?? kubectl delete -f <file.yaml> ???
7. kubectl scale Purpose: Adjust the number of replicas in a Deployment
?? kubectl scale deployment <deployment-name> --replicas=<number> ??
8. kubectl rollout Purpose: Manage and view Deployment rollouts
?? kubectl rollout history deployment <deployment-name> ??
9. kubectl port-forward Purpose: Forward local ports to a Pod
?? kubectl port-forward <pod-name> <local-port>:<pod-port> ??
10. kubectl config Purpose: Manage kubeconfig files and contexts
?? kubectl config get-contexts / use-context / set-context ??
Which kubectl commands are critical to your daily Kubernetes operations? Share your preferred commands or tips in the comments! ??
Follow me for more insights and updates on Kubernetes and cloud technology. ??