Interview Prep/Kubernetes/Storage and volumes

An EFS-backed Pod hangs in `ContainerCreating` and the CSI node logs show `mount.nfs4: Connection timed out`.

IntermediateTroubleshootingStorage and volumes
Answer

Likely causes → The node cannot reach the EFS mount target on TCP 2049: mount target security group does not allow the node security group, no mount target in that AZ, or DNS for the file system ID does not resolve in the VPC.

Diagnose →

kubectl logs -n kube-system -l app=efs-csi-node -c efs-plugin --tail=50
aws efs describe-mount-targets --file-system-id fs-0abc --query 'MountTargets[].[AvailabilityZoneName,IpAddress]'
kubectl debug node/<node> -it --image=nicolaka/netshoot -- nc -zv <mount-target-ip> 2049

Fix → Add an inbound rule on the mount target security group for TCP 2049 from the node (or Pod) security group, and create mount targets in every AZ with nodes.

Prevent → Provision EFS mount targets and security groups with the cluster in IaC.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Storage and volumes