troubleshooting

komovo · website-7c8b549745-qfbjf

pod stuck in pending

Most common cause: insufficient CPU. The sum of requests across all pods exceeds the node's allocatable CPU. Check with:

bashkubectl describe node | grep -A5 "Allocated resources"
kubectl top node

Fix: lower CPU requests on idle services, or delete old ReplicaSets that hold higher request values.

pod crashlooping

bash# check logs
kubectl logs pod-name -n ns --tail=50

# describe for exit code
kubectl describe pod pod-name -n ns | grep -A10 "Last State"

# common causes:
#   - hostPath directory has wrong permissions
#   - secret/configmap doesn't exist
#   - liveness probe misconfigured

flux errors

bash# check kustomization status
flux get kustomizations -A

# dry-run failed so resources need manual cleanup
kubectl delete ns <old-namespace>

# source fetch failed
flux get sources git -n flux-system

nodeport conflict

Two Services in different namespaces trying to use the same nodePort. Happens during renames or reorganization.

bash# find what's using the port
kubectl get svc -A | grep <port>

# delete the old service/namespace
kubectl delete ns <old-namespace>

disk full

bash# check usage
df -h

# clean container images
sudo k3s ctr images prune

# clean journal logs
sudo journalctl --vacuum-size=200M

# find large files
find /var/log -type f -size +50M -exec ls -lh {} \; 2>/dev/null