K8s by Example: kubectl Basics
|
|
| terminal | |
| List resources. Works with any resource type: pods, services, deployments, nodes, configmaps, secrets, etc. | |
| terminal | |
| Common flags: | |
| terminal | |
| Show detailed info about a resource. Includes events, which are essential for debugging why something isn’t working. | |
| terminal | |
|
| |
| terminal | |
| View container logs. Add | |
| terminal | |
| Run commands inside a container. Use | |
| terminal | |
| Forward a local port to a pod or service. Useful for testing without exposing services externally. | |
| terminal | |
| Quick way to run a pod without writing YAML. Good for debugging. Add | |
| terminal | |
| Manage cluster contexts. A context combines a cluster, user, and namespace. Switch between clusters with | |
| terminal | |
| When something isn’t working: check pod status, read events, check logs. | |
Index | Use arrow keys to navigate