DEV Community

Veeresh
Veeresh

Posted on

K8S Pod failures

Here are 5 pod failures you'll actually face

  1. ImagePullBackOff - "No basic auth credentials." Your node needs an IAM role with ECR permissions.

Check: kubectl describe node | grep iam
No role = No image pulls. Attach AmazonEC2ContainerRegistryReadOnly policy.

  1. "Exec format error"
    You built the image on your Mac M2. EKS nodes run AMD64.
    Fix: Always build with --platform linux/amd64

  2. "Connection refused" to database
    Your RDS security group isn't allowing traffic from your NODE security group.

Add inbound rule: Allow port 5432 from sg-node-xxxxx

  1. "Environment variable not set" Secret exists but in wrong namespace. Or wrong key name.

Check: kubectl get secret -n

Match the key names exactly in your secretKeyRef.

  1. CrashLoopBackOff with no logs App needs more startup time than your liveness probe allows. Increase initialDelaySeconds in your probe from 10s to 30s.

Follow for more!

Top comments (0)