Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

I followed the documentation to update the certificate and the cluster crashed. #5787

Closed
siaimes opened this issue Jun 8, 2022 · 2 comments

Comments

@siaimes
Copy link
Contributor

siaimes commented Jun 8, 2022

Organization Name:

Short summary about the issue/question:

DOC: https://github.com/microsoft/pai/blob/master/docs/manual/cluster-admin/how-to-renew-k8s-cert.md

The root of the issue lies in this line of code:

ansible-playbook -i hosts.yml --limit '!master-node' --become --become-user root renew-worker-cert.yaml

image

As shown in the figure, the master node should use !kube-master to exclude instead of !master-node, which causes the master node to update itself as a worker node, and the cluster crashes.

So this line should be changed to:

ansible-playbook -i hosts.yml --limit '!kube-master' --become --become-user root renew-worker-cert.yaml

Other minor issues:

Currently the etcd of the openpai cluster does not seem to have a certificate, so there is no need to etcd related commands.

Brief what process you are following:

How to reproduce it:

OpenPAI Environment:

  • OpenPAI version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Hardware (e.g. core number, memory size, storage size, GPU type etc.):
  • Others:

Anything else we need to know:

@siaimes
Copy link
Contributor Author

siaimes commented Jun 8, 2022

My one command solution for this doc:

https://github.com/siaimes/renew-k8s-certs

@Binyang2014
Copy link
Contributor

Thanks for this. And there is another option to rotate cert automatically, please refer: https://kubernetes.io/docs/tasks/tls/certificate-rotation/. We have an issue for this #5439

@siaimes siaimes closed this as completed Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants