Coder Social home page Coder Social logo

Comments (4)

cartermckinnon avatar cartermckinnon commented on June 3, 2024

simply open a shell on node and kill the kubelet by command: kill

That isn't simulating a crash, that sends a SIGTERM to the process, kubelet traps the signal and terminates normally (with an exit code of zero). If you send a SIGKILL (kill -9), you get the auto-restart that you'd expect, which is what happens when kubelet exits unexpectedly due to a panic, etc.:

> systemctl status kubelet
● kubelet.service - Kubernetes Kubelet
     Loaded: loaded (/etc/systemd/system/kubelet.service; disabled; preset: disabled)
     Active: active (running) since Fri 2024-05-10 18:10:35 UTC; 2min 7s ago
       Docs: https://github.com/kubernetes/kubernetes
    Process: 2744679 ExecStartPre=/sbin/iptables -P FORWARD ACCEPT -w 5 (code=exited, status=0/SUCCESS)
   Main PID: 2744680 (kubelet)
      Tasks: 12 (limit: 18811)
     Memory: 29.3M
        CPU: 1.407s
     CGroup: /runtime.slice/kubelet.service
             └─2744680 /usr/bin/kubelet --node-ip=192.168.174.139 --cloud-provider=external --hostname-override=ip-192-168-174-139.us-west-2.compute.internal --config=/etc/kubernetes/kube>

> sudo kill -9 2744680

> systemctl status kubelet
● kubelet.service - Kubernetes Kubelet
     Loaded: loaded (/etc/systemd/system/kubelet.service; disabled; preset: disabled)
     Active: activating (auto-restart) (Result: signal) since Fri 2024-05-10 18:13:02 UTC; 1s ago
       Docs: https://github.com/kubernetes/kubernetes
    Process: 2744679 ExecStartPre=/sbin/iptables -P FORWARD ACCEPT -w 5 (code=exited, status=0/SUCCESS)
    Process: 2744680 ExecStart=/usr/bin/kubelet $NODEADM_KUBELET_ARGS (code=killed, signal=KILL)
   Main PID: 2744680 (code=killed, signal=KILL)
        CPU: 1.526s

from amazon-eks-ami.

alexku7 avatar alexku7 commented on June 3, 2024

I will try but it doesn't so matter
We experienced an issue (twice) when the kubelet has been crashed because of memory pressure and never been recovered.
As return the pods were stuck forever. The only way to recover is deleting manually the EC2 node in the AWS console.

GKE and AKS implement a simple kublet watchdog. The kubelet restarts immediately

from amazon-eks-ami.

cartermckinnon avatar cartermckinnon commented on June 3, 2024

If kubelet crashes, it's going to be restarted by systemd, see my example above. It sounds like you're running into problems with kubeReserved memory being insufficient, which is legit. That's discussed in #1141 and #1145.

from amazon-eks-ami.

alexku7 avatar alexku7 commented on June 3, 2024

Thanks
I think this is what we actually had
#1145

from amazon-eks-ami.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.