0

I am new in DevOps. Recently I bought two raspberry pi devices and setup one as master and the another as worker node. When I reboot the device the docker containers (api server etc.) don't up.

What should to do in this case ? Should I use kubeadm reset and kubeadm init each and every time I reboot device (server in case of production) and re configure the whole cluster ?

I am attaching screenshot here:

journalctl -u kubelet

journalctl -u kubelet

Shamim
  • 101
  • 4
  • The short version is "for sure: no" but no one can help you without posting why your containers don't start after reboot; please consider [editing your post](https://serverfault.com/posts/1022937/edit) to include that detail – mdaniel Jun 25 '20 at 19:41
  • If the docker container get upped then will the cluster automatically be configured ? I don't know actually whether I should manually configure or not each time I reboot the server. – Shamim Jun 26 '20 at 03:30
  • Does the IP address of the master node change when you reboot? – Matt Jun 26 '20 at 07:35
  • No, it is fixed @HelloWorld – Shamim Jun 26 '20 at 10:35
  • Can you provide logs from kubelet? `journalctl -u kubelet` and also check if docker is running after reboot `systemctl status docker`. – Matt Jun 26 '20 at 10:56
  • I have edited my question and added screenshot of `journalctl -u kubelet`. Please kindly see the errors. And yes, `docker` is running @HelloWorld – Shamim Jun 26 '20 at 15:35
  • Lines in golang logging that begin with `F` are fatal, as one can see in that _error message_ saying you must disable swap, or otherwise tell kubelet you're prepared to deal with the mess that can result from leaving it enabled – mdaniel Jun 26 '20 at 16:10

1 Answers1

0

In Kubelet logs you can see this line:

failed to run Kubelet: running with swap on is not supported.

Followed by Main process exited.

To resolve the issue you need to disable swap. Check this stackoverflow answer for more info on how to do it if you don't know.

Matt
  • 528
  • 3
  • 7