Fixing aws eks pod evicted (DiskPressure)

When working with AWS EKS, using this cloudformation template might cause the issue as below when describing the “Evicted” pod (out of resource warning from aws eks).

kubectl describe pod ingress-nginx-controller-xxx -n ingress-nginx

Status: Failed
Reason: Evicted
Message: Pod The node had condition: [DiskPressure].

describe pod
describe pod

You can edit the volume size param as below (via cloudformation)

eks worker node cloud formation
eks worker node edit cloudformation stack (increase to 20GB – EBS volume size)

The cloudformation template above related to this template file

aws eks  node volume size
aws eks node volume size

link: https://github.com/awslabs/amazon-eks-ami/blob/master/amazon-eks-nodegroup.yaml#L23

After increasing the storage size of the node (~ an ec2 instance), now “Evicted” pod (DiskPressure) will disappear.

Hope this well hope who is facing with this issue on AWS EKS 😉

Ref(s):

  1. https://medium.com/faun/kubelet-pod-the-node-was-low-on-resource-diskpressure-384f590892f5
  2. https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/