-
Notifications
You must be signed in to change notification settings - Fork 68
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
[BUG] Client certificates generated by kubeadm expire after 1 year #1108
Comments
Just had a user report that k8s certificate replacement works BUT the ingress endpoints don't work and this is because we also have ingress certs https://github.com/vmware-samples/vcenter-event-broker-appliance/blob/development/files/setup-09-ingress.sh#L43 that also need to get re-generated by deleting and re-creating the secret |
Hi, I am the mentioned user, I was able to get kubectl working using
|
I've tested, validated and documented the required steps. It'll be part of the PR which takes care of #1074 |
Closes: vmware-samples#1074 Closes: vmware-samples#1108 Closes: vmware-samples#1132 Signed-off-by: Robert Guske <[email protected]>
Closes: vmware-samples#1074 Closes: vmware-samples#1108 Closes: vmware-samples#1132 Signed-off-by: Robert Guske <[email protected]>
Describe the bug
By default, client certificates generated by kubeadm expire after 1 year.
See also Certificate Management with kubeadm.
Normally, certificates will be renewed during a Kubernetes version upgrade. Since upgrading to a new VEBA version (including PhotonOS, Kubernetes, Knative, etc.) is most likely in all cases done by just deploying a complete new instance, users will face this issue when running VEBA for more than 365 days.
We need to have this mentioned in our documentation.
To Reproduce
Check certificate expiration dates using
kubeadm
:kubeadm certs check-expiration [check-expiration] Reading configuration from the cluster... [check-expiration] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml' CERTIFICATE EXPIRES RESIDUAL TIME CERTIFICATE AUTHORITY EXTERNALLY MANAGED admin.conf Jun 15, 2024 13:27 UTC 262d ca no apiserver Jun 15, 2024 13:27 UTC 262d ca no apiserver-etcd-client Jun 15, 2024 13:27 UTC 262d etcd-ca no apiserver-kubelet-client Jun 15, 2024 13:27 UTC 262d ca no controller-manager.conf Jun 15, 2024 13:27 UTC 262d ca no etcd-healthcheck-client Jun 15, 2024 13:27 UTC 262d etcd-ca no etcd-peer Jun 15, 2024 13:27 UTC 262d etcd-ca no etcd-server Jun 15, 2024 13:27 UTC 262d etcd-ca no front-proxy-client Jun 15, 2024 13:27 UTC 262d front-proxy-ca no scheduler.conf Jun 15, 2024 13:27 UTC 262d ca no CERTIFICATE AUTHORITY EXPIRES RESIDUAL TIME EXTERNALLY MANAGED ca Jun 13, 2033 13:27 UTC 9y no etcd-ca Jun 13, 2033 13:27 UTC 9y no front-proxy-ca Jun 13, 2033 13:27 UTC 9y no
Expected behavior
It is actually an expected behavior of Kubernetes.
It's possible to renew the certificates manually using
kubeadm certs renew all
. A reboot is necessary after the renewal. Also, the update of the.kube/config
file.cp /root/.kube/config /root/.kube/.old-$(date --iso)-config cp /etc/kubernetes/admin.conf /root/.kube/config
Screenshots
If applicable, add screenshots to help explain your problem.
Version (please complete the following information):
Additional context
Issue raised by the VEBA Slack community: Link to the thread.
The text was updated successfully, but these errors were encountered: