-como saber si el OS tiene cluster corriendo o iniciados ---------------------------------------------------------------------------init clusters Initialize the control plane(cp) root@cp:# kubeadm init --config=kubeadm-crio.yaml --upload-certs | tee kubeadm-init.out # Save output for future review Success messages: Your Kubernetes control-plane has initialized successfully! To start using your cluster, you need to run the following as a regular user: mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config Alternatively, if you are the root user, you can run: export KUBECONFIG=/etc/kubernetes/admin.conf You should now deploy a pod network to the cluster. Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at: https://kubernetes.io/docs/concepts/cluster-administration/addons/ You can now join any number of the control-plane node running the following command on each as root: kubeadm join k8scp:6443 --token abcdef.0123456789abcdef \ --discovery-token-ca-cert-hash sha256:6cff953cb5b537a8eef9c32535dbe3db9deca2884f8000ac4e59c9c11854c85b \ --control-plane --certificate-key 733803415367b636ee688ae7b2cbda2b61f1d838366f148092efd8f329cec114 Please note that the certificate-key gives access to cluster sensitive data, keep it secret! As a safeguard, uploaded-certs will be deleted in two hours; If necessary, you can use "kubeadm init phase upload-certs --upload-certs" to reload certs afterward. Then you can join any number of worker nodes by running the following on each as root: kubeadm join k8scp:6443 --token abcdef.0123456789abcdef \ --discovery-token-ca-cert-hash sha256:6cff953cb5b537a8eef9c32535dbe3db9deca2884f8000ac4e59c9c11854c85b ---------------------------------------------------------------------------join workers and manage tokens --- view current tokens student@cp:$ sudo kubeadm token list --- create new tokens student@cp:$ sudo kubeadm token create --- Create and use a Discovery Token CA Cert Hash created from the cp to ensure the node joins the cluster in a securemanner. Run this on the cp node or wherever you have a copy of the CA file. see /etc/kubernetes/pki student@cp:$ openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/ˆ.* //' ---On the worker node add a local DNS alias for the cp server. root@worker:# vim /etc/hosts 10.128.0.3 k8scp #<-- Add this line --Use the token and hash, in this case assha256:long-hashto join the cluster from thesecond/workernode. root@worker:# kubeadm join --token k8scp:6443 --discovery-token-ca-cert-hash sha256: Ej. root@worker:# kubeadm join --token 27eee4.6e66ff60318da929 k8scp:6443 --discovery-token-ca-cert-hash sha256:6d541678b05652e1fa5d43908e75e67376e994c3483d6683f2a18673e5d2a1b0 kubeadm join --token hofgbm.vh8coc1nxfx9zdb4 k8scp:6443 --discovery-token-ca-cert-hash sha256:e56c42367d19b855e8405abcac82150fc9aff740b07084a787e6575541921d3c kubeadm join --token o0klwp.jsvzn7vvxmg004oi k8scp:6443 --discovery-token-ca-cert-hash sha256:bd85757824fd126d92e63ee0dfc2ded8ef4aba73e44e34c127ee37c7affd59e3 ------------------------------------------------------------------------upgrade plan Use the upgrade plan argument to check the existing cluster and then update the software. student@cp:~$ sudo kubeadm upgrade plan -----------------------------------------------------------------to actually upgrade the software. student@cp:~$ sudo kubeadm upgrade apply