8. Instalar nodo worker

Documento para instalar un cluster kubernetes con tres nodos, un master y dos workers.

Pasos a seguir una vez instalado y actualizado el sistema operativo.

Es necesario seguir los pasos de instalación del nodo master para instalar los repositorios, paquetería, deshabilitar swap, SELinux y firewall.

  1. Agregar el nodo worker al cluster

Para agregar el nodo worker al cluster, es necesario ejecutar el comando que se muestra al final de la salida del comando kubeadm init en el nodo master.

Este comando debe ser ejecutado en cada uno de los nodo worker.

kubeadm join master.iglu.net:6443 --token 1p5izb.4irexouwmnl9nrkv \
        --discovery-token-ca-cert-hash sha256:4ae3a28612046cdd15706e9e9f818311db4cfc14ef3daf3ba76a3a4df66b0712

Ejemplo de salida del comando anterior:

[preflight] Running pre-flight checks
[preflight] Reading configuration from the "kubeadm-config" ConfigMap in namespace "kube-system"...
[preflight] Use 'kubeadm init phase upload-config kubeadm --config your-config-file' to re-upload it.
W0905 20:35:55.043821   21767 utils.go:69] The recommended value for "bindAddress" in "KubeProxyConfiguration" is: ::; the provided value is: 0.0.0.0
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/instance-config.yaml"
[patches] Applied patch of type "application/strategic-merge-patch+json" to target "kubeletconfiguration"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-check] Waiting for a healthy kubelet at http://127.0.0.1:10248/healthz. This can take up to 4m0s
[kubelet-check] The kubelet is healthy after 500.966216ms
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap

This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.