17 lines
439 B
Markdown
17 lines
439 B
Markdown
# Sample Answer: File-Like Question (Q4)
|
|
|
|
## Pod inspection/debug commands
|
|
|
|
1. `kubectl get pods -n default`
|
|
2. `kubectl get pods -o wide`
|
|
3. `kubectl describe pod nginx-demo`
|
|
4. `kubectl logs nginx-demo`
|
|
5. `kubectl exec -it nginx-demo -- sh`
|
|
|
|
## Short notes
|
|
|
|
- `get` shows current pod state.
|
|
- `describe` shows events and scheduling details.
|
|
- `logs` helps troubleshoot application output.
|
|
- `exec` lets you inspect container internals.
|