-
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
/etc/kuberentes/ssl certs do not update expire date with upgrade #5555
Comments
Hei, before upgrade: after upgrade : |
this is kubeadm bug, kubernetes/kubeadm#1818 we need add |
I am running 1.14, this bug appears to be in 1.15, am I correct? I attempted to make the change anyways and received the following error.
|
Not sure if I have the same issue/related or completely different certificate issue. I ran into expiring certificate issue as well. After upgrading 1.14.3 (2.10.3 kubespray) to 1.15.3 (2.11.0 kubespray) the kubelet certificate on the master nodes was not renewed. That kubelet certificate on master is expiring in 4 days in my case. I noticed that the master nodes kubelet.conf is configured to use On the master node:
And on the master node checking an existing (but looks like unused) file /var/lib/kubelet/pki/kubelet-client-current.pem
Any comments/advice on:
Edit I'm still unclear about differences in expiry dates, for example
However as posted in my case /var/lib/kubelet/pki/kubelet-client-current.pem is expiring |
--certificate-renewal flag appeared in version 1.16 you may get kubeadm v1.16 and rotate certificate via command |
Master and worker upgrade to the new patch, but the certificates still have the old expiration date. I have tested going from 14.1 to 14.2 and 14.2 to 14.3 same problem, the certs still have the old expiration date.
Environment:
Dell R440 bare metal
Linux 4.4.0-171-generic x86_64
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
ansible 2.7.10
config file = /root/kubespray-2.10.0/ansible.cfg
configured module search path = [u'/root/kubespray-2.10.0/library']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.12 (default, Oct 8 2019, 14:14:10) [GCC 5.4.0 20160609]
**Kubespray version - 2.10.0
Network plugin used: Calico
Command used to invoke ansible:
ansible-playbook upgrade-cluster.yml -b -i inventory/mycluster/hosts.yaml -e kube_version=v1.14.3 -u root --ask-pass -b --become-user=root
***14.2 before upgrade
-kubectl get nodes
NAME STATUS ROLES AGE VERSION
kats-1 Ready 3d1h v1.14.2
kats-2 Ready 3d1h v1.14.2
kats-3 Ready 3d1h v1.14.2
kats-4 Ready 3d1h v1.14.2
kats-5 Ready 3d1h v1.14.2
kats-km1 Ready master 3d1h v1.14.2
kats-km2 Ready master 3d1h v1.14.2
kats-km3 Ready master 3d1h v1.14.2
-cat /etc/kubernetes/ssl/apiserver.crt | openssl x509 -text | less
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 2175565984948876246 (0x1e3129bc964cf3d6)
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=kubernetes
Validity
Not Before: Jan 14 14:17:20 2020 GMT
Not After : Jan 13 14:17:20 2021 GMT <<<<----------
Subject: CN=kube-apiserver
***14.3 after upgrade
-kubectl get nodes
NAME STATUS ROLES AGE VERSION
kats-1 Ready 3d2h v1.14.3
kats-2 Ready 3d2h v1.14.3
kats-3 Ready 3d2h v1.14.3
kats-4 Ready 3d2h v1.14.3
kats-5 Ready 3d2h v1.14.3
kats-km1 Ready master 3d2h v1.14.3
kats-km2 Ready master 3d2h v1.14.3
kats-km3 Ready master 3d2h v1.14.3
-cat /etc/kubernetes/ssl/apiserver.crt | openssl x509 -text | less
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 2175565984948876246 (0x1e3129bc964cf3d6)
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=kubernetes
Validity
Not Before: Jan 14 14:17:20 2020 GMT
Not After : Jan 13 14:17:20 2021 GMT <<<<----------
Subject: CN=kube-apiserver
The text was updated successfully, but these errors were encountered: