Common Commands

Essential kubectl commands for cluster management, debugging, and monitoring

Advanced kubectl get Techniques: Filtering Output with Labels and JSONPath

Advanced kubectl get Techniques: Filtering Output with Labels and JSONPath

Unlock the full potential of `kubectl get` by mastering advanced filtering techniques. This comprehensive guide details how to leverage Kubernetes label selectors for precise resource targeting, allowing you to query specific Pods, Deployments, and Services. Furthermore, learn to craft custom JSONPath templates to extract and format exactly the data you need in a machine-readable format. With practical examples and best practices, enhance your cluster management, debugging, and automation workflows by efficiently retrieving accurate, tailored information from your Kubernetes environment.

DevOps Knowledge Hub
29
kubectl apply vs set: Choosing the Right Command for Resource Updates

kubectl apply vs set: Choosing the Right Command for Resource Updates

Navigate the critical choice between `kubectl apply` (declarative) and `kubectl set`/`kubectl edit` (imperative) for managing Kubernetes resource updates. This comprehensive guide breaks down how each command works, their fundamental differences, and when to use them effectively. Learn to leverage declarative management for consistency and GitOps, while understanding the role of imperative commands for quick, ad-hoc fixes. Master best practices to prevent configuration drift and ensure stable, auditable Kubernetes deployments.

DevOps Knowledge Hub
31
Troubleshooting Kubernetes Connectivity: Using exec and port-forward Effectively

Troubleshooting Kubernetes Connectivity: Using exec and port-forward Effectively

Troubleshoot Kubernetes connectivity and internal application issues with confidence. This guide provides practical examples of using `kubectl exec` to run commands inside containers and `kubectl port-forward` to securely access services from your local machine. Learn how to diagnose network problems, inspect configurations, and gain deep insights into your application's behavior within the cluster.

DevOps Knowledge Hub
29
Guide to Managing Multiple Kubernetes Clusters with kubectl config

Guide to Managing Multiple Kubernetes Clusters with kubectl config

Master managing multiple Kubernetes clusters with `kubectl config`. This guide provides a step-by-step tutorial on switching contexts, viewing cluster details, and organizing kubeconfig files. Learn practical commands and best practices to streamline your multi-cluster workflow, enhance security, and boost productivity in your container orchestration tasks.

DevOps Knowledge Hub
34
Mastering kubectl logs and describe for Efficient Pod Debugging

Mastering kubectl logs and describe for Efficient Pod Debugging

This guide provides expert techniques for mastering the essential Kubernetes debugging commands: `kubectl logs` and `kubectl describe`. Learn the critical flags, such as `-f`, `--tail`, `-c`, and `--previous`, required for efficient troubleshooting. We detail how to interpret the crucial 'Events' section in `describe` to diagnose scheduling and configuration issues, and how to use `logs` to extract runtime errors from crashing or multi-container pods, accelerating your debugging workflow.

DevOps Knowledge Hub
29