-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update the apiserver etcd ca ssl certificate #7104
Comments
They are updated on ugprade, that's what the k8s team recommend as after a year a Kubernetes version is no longer supported and HAS TO be upgraded. Anyway this may help you => #6403 |
Is it possible to write a shell script to update all the keys under /etc/kubernetes/ssl? I am not familiar with the running logic of kubespray ansible code
|
That's more something to ask on Kubernetes end, I won't advise something like that ;) |
So if I run kubespary in a production environment, how do I do if the certificate expires after one year? Will it be risky? |
As I said, after a year you should have already update Kubernetes components, if not you are already at risk as Kubernetes team support only 3 version (one version every 3 or 4 months, that 9 months to 12 months). |
After translating I think I get what you mean, we are not talking about casual upgrade, we are talking about CVE and security, after 3 versions the Kubernetes stop supporting version and stop backporting bugs and CVE that's why you should not keep an old Kubernetes version running. But as said, the PR allow that as we also understand that depending on the context some people might have to still be running an old version (but I won't talk about that again, I'm strongly against that 😄 ) |
Does kubespary provide a script or tool for one-click upgrade of kubernetes version? |
We don't provide a script or tool, we provide ansible playbooks and yes with the PR you can renew those with one execution with the correct setup. Explanation in #6403
|
Thanks, I have no problem here. |
I tried to change the k8s-cluster.yml force_certificate_regeneration: true variable, and changed the server time, and found that k8s would be outdated, prompting that the certificate expired x509, and it did not force the certificate to be renewed automatically. [root@node1 pki]# kubectl get node CERTIFICATE EXPIRES RESIDUAL TIME CERTIFICATE AUTHORITY EXTERNALLY MANAGED CERTIFICATE AUTHORITY EXPIRES RESIDUAL TIME EXTERNALLY MANAGED |
/ping @pestebogdan |
Hello, From what I remember, this works only if the cluster's certificates are currently valid (and will prolong the validity for them for 1 year from the day you run them). If they are already expired, this may not work. I had been in the second scenario (certificates expired) and followed a manual procedure to renew them following a sequence of tasks. I had it documented somewhere, if i find it i will post it here if it's of interest, but as to the newly added variable, this should be considered an action you would need to do before the certificates expire. Also, etcd certificates were not included in the rotation because as I remember they had a really long validity period (~100 years) so not really relevant. |
I changed force_certificate_regeneration: true to true before deployment, and then deployed it. After deploying kubespray, I changed the server time and found a 509 certificate error. I felt that changing force_certificate_regeneration: false to force_certificate_regeneration: true did not work. , Etcd certificate is 10 years, apiserver is valid for one year. |
Do you have the latest master branch ? are you sure that you have the PR #6403 in your local codebase ? |
Not sure i understand the sequence of events you followed or the reason for the server time change, but let me give you the sequence I used to test the new functionality before submitting the PR.
|
Yes, the kubespray warehouse of git clone on the morning of January 7, 2021 |
kubespray again (cluster.yml), do I need to run the cluster.yaml file again? How do I do it? I only executed ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root once cluster.yml |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
How does kubespray update the ssl certificate, or is there a script or script that can set the certificate validity period to 10 or 100 years?
The text was updated successfully, but these errors were encountered: