I am working on a use case where I need node status Not Ready. I know that node cordon kubectl cordon NODE
but this will mark node as Ready,SchedulingDisabled
.
For example
kubectl cordon node_id
So is there a way to manually set node status Not Ready in AWS EKS?
ssh to worker node and stop kubelet. (SSH to EKS Worker Nodes)
taken from How to simulate nodeNotReady for a node in Kubernetes:
Another way is to overload the Node which will cause: System OOM encountered and that will result in Node NotReady state. This is just one of the ways of how to achieve it: SSH into the Node you want to get into NotReady Install Stress Run stress:
stress --cpu 8 --io 4 --hdd 10 --vm 4 --vm-bytes 1024M --timeout 5m
(you can adjust the values of course) Wait till Node crash. After you stop the stress the Node should get back to healthy state automatically.