Welcome to the Linux Foundation Forum!

LFS258 - Kubernetes Install Lab 3.1 -- Issues with the kubelet

This is what this ubuntu system had dumped out

It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248
: connect: connection refused.
        Unfortunately, an error has occurred:
                error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher
timed out waiting for the condition
        This error is likely caused by:
                - The kubelet is not running
                - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)
        If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
                - 'systemctl status kubelet'
                - 'journalctl -xeu kubelet'
        Additionally, a control plane component may have crashed or exited when started by the container runtime.
        To troubleshoot, list all containers using your preferred container runtimes CLI.
        Here is one example how you may list all Kubernetes containers running in docker:
                - 'docker ps -a | grep kube | grep -v pause'
                Once you have found the failing container, you can inspect its logs with:
                - 'docker logs CONTAINERID'

I already had to up the size on the VM to 2vCPU because it wasn't liking the one.

Comments

  • serewicz
    serewicz Posts: 1,000

    Hello,

    I would encourage you to revisit the lab and read it from the beginning. It declares minimal VM sizes, firewall settings, swap settings and more.

    As well I note your error is going to localhost, instead of k8smaster as the lab has you configure. It would seem that many steps were skipped.

    I'd suggest reading and following the lab from the start, then setting up new VMs.

    Regards,

  • DRpandaMD
    DRpandaMD Posts: 17
    edited August 2020

    I will give it another shot, this isn't the first lab that I've issues with.

    Documentation is very much all over the place.

  • serewicz
    serewicz Posts: 1,000

    Hello,

    Perhaps highlight one line at a time, to make sure you are reading all of it. With electronic books it can be difficult to keep one's place. If you jump from command to command without reading each step it can be even easier to skip a step. As with many technologies if you don't run commands in order you will get odd results.

    Like trying to bake a cake, put the oil and eggs in a pan, bake 30 minutes, then add the mix - you don't end up with cake. Order matters.

    Regards,

  • So I guess resizing on the fly isn't liked by Kubeadm.

    I provisioned the N-2 2vCPU 7GB ram instance and repeated the same process and it behaved as expected.

    Now here is a fun question. I don't mess around with vanilla DYI K8s because GKE makes it much nicer (oh and you get the control plane for FREE)

    But what happens if for whatever reason you need to scale all the VMs in the cluster at once to large instance size.

    Will kubeadm through a hissy fit or will it behave?

  • serewicz
    serewicz Posts: 1,000

    Hello,

    It should behave. But there are caps on how many pods will be deployed on an instance. Which is why most build clusters with lots of instances, not fewer large instances. GKE does make things easy, but it comes at an added expense and loss of control. As with many things we choose what's best for our circumstance, I just try to explain the trade-offs.

    Regards,

Categories

Upcoming Training