34 lines
822 B
Plaintext
34 lines
822 B
Plaintext
# Kubernetes Troubleshooting Guide
|
|||
|
|
|
||
|
|
## Port Conflicts
|
||
|
|
|
||
|
|
When a port conflict occurs on port 8080, check for existing services:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
kubectl get svc --all-namespaces | grep 8080
|
||
|
|
```
|
||
|
|
|
||
|
|
### Common Causes
|
||
|
|
|
||
|
|
1. Multiple services binding to same NodePort
|
||
|
|
2. Host network pods conflicting with node services
|
||
|
|
3. Ingress controller port overlap
|
||
|
|
|
||
|
|
## CrashLoopBackOff
|
||
|
|
|
||
|
|
Pods enter CrashLoopBackOff when the container exits repeatedly.
|
||
|
|
|
||
|
|
### Diagnosis Steps
|
||
|
|
|
||
|
|
1. Check pod logs: `kubectl logs <pod> --previous`
|
||
|
|
2. Check events: `kubectl describe pod <pod>`
|
||
|
|
3. Check resource limits: memory/CPU constraints
|
||
|
|
4. Check liveness probes: incorrect health check paths
|
||
|
|
|
||
|
|
### Resolution
|
||
|
|
|
||
|
|
- Increase memory limits if OOMKilled
|
||
|
|
- Fix application startup errors
|
||
|
|
- Adjust probe timing (initialDelaySeconds)
|
||
|
|
- Check environment variable configuration
|