Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rke kubernetes - node reboot

Tags:

kubernetes

rke

I have initialize a kubernetes cluster with rke (rke up).

However when a node reboots, I have to execute rke up again to start kubelet and co.

Is there a way these services start automatically on the node?

Thanks for your help.

I use rke v0.1.9.

The OS is Coreos Container Linux 1855.4.0.

My cluster.yml is:

nodes:
    - address: 198.19.210.32
      user: core
      role:
        - controlplane
        - etcd
    - address: 198.19.210.33
      user: core
      role:
        - worker
    - address: 198.19.210.34
      user: core
      role:
        - worker
      labels:
        app: ingress

# If set to true, RKE will not fail when unsupported Docker version are found
ignore_docker_version: true

# Enable use of SSH agent to use SSH private keys with passphrase
# This requires the environment `SSH_AUTH_SOCK` configured pointing to your SSH agent which has the private key added
ssh_agent_auth: true
like image 937
matth3o Avatar asked Nov 07 '22 02:11

matth3o


1 Answers

kubelet, kube-apiserver, etc, and other non-k8s containers that are created by RKE should have the restart policy of always.

If not, you can update it the following command.

docker update --restart=always kubelet

Also, rke v0.1.9 is very old. Please try using rke v1.1.4.

like image 59
Matthew Mattox Avatar answered Nov 18 '22 08:11

Matthew Mattox