Skip to content

k8s-certs-renew renews certs every month #13072

@lazybetrayer

Description

@lazybetrayer

What happened?

When k8s-certs-renew is running, next_time is emtpy, causing the certs renewed directly, effectively renews the certs every month.

Mar 03 10:13:11 master1 k8s-certs-renew.sh[1985557]: ++ systemctl show k8s-certs-renew.timer -p NextElapseUSecRealtime --value
Mar 03 10:13:11 master1 k8s-certs-renew.sh[1985529]: + next_time=
Mar 03 10:13:11 master1 k8s-certs-renew.sh[1985529]: + '[' '' == '' ']'
Mar 03 10:13:11 master1 k8s-certs-renew.sh[1985529]: + echo '## Skip expiry comparison due to fail to parse next elapse from systemd calendar,do renewal directly ##'
Mar 03 10:13:11 master1 k8s-certs-renew.sh[1985529]: ## Skip expiry comparison due to fail to parse next elapse from systemd calendar,do renewal directly ##
Mar 03 10:13:11 master1 k8s-certs-renew.sh[1985529]: + echo '## Renewing certificates managed by kubeadm ##'
Mar 03 10:13:11 master1 k8s-certs-renew.sh[1985529]: ## Renewing certificates managed by kubeadm ##
Mar 03 10:13:11 master1 k8s-certs-renew.sh[1985529]: + /usr/local/bin/kubeadm certs renew all

I dumped all the properties of the timer ink8s-certs-renew.sh, it seems there's no NextElapseUSecRealtime when timer is active.
timer-values.txt

What did you expect to happen?

only renew certs when necessary

How can we reproduce it (as minimally and precisely as possible)?

1

OS

Ubuntu 24

Version of Ansible

all supported versions

Version of Python

all supported versions

Version of Kubespray (commit)

v2.30.0

Network plugin used

custom_cni

Full inventory with variables

1

Command used to invoke ansible

1

Output of ansible run

1

Anything else we need to know

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ubuntu 24kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions