Monday, August 10, 2026

Renew k8s certificates

Check If certificate expires:

amikum@~:03:06:54(⎈ |local-cluster:default):sudo kubeadm certs check-expiration

CERTIFICATE                EXPIRES                  RESIDUAL TIME   CERTIFICATE AUTHORITY   EXTERNALLY MANAGED

admin.conf                 Jan 12, 2024 03:08 UTC   1y                                      no

apiserver                  Jun 08, 2023 09:36 UTC   364d            ca                      no

apiserver-etcd-client      Apr 15, 2022 06:46 UTC   <invalid>       etcd-ca                 no

apiserver-kubelet-client   Apr 15, 2022 06:46 UTC   <invalid>       ca                      no

controller-manager.conf    Apr 15, 2022 06:46 UTC   <invalid>                               no

etcd-healthcheck-client    Apr 15, 2022 06:46 UTC   <invalid>       etcd-ca                 no

etcd-peer                  Apr 15, 2022 06:46 UTC   <invalid>       etcd-ca                 no

etcd-server                Apr 15, 2022 06:46 UTC   <invalid>       etcd-ca                 no

front-proxy-client         Apr 15, 2022 06:46 UTC   <invalid>       front-proxy-ca          no

scheduler.conf             Apr 15, 2022 06:46 UTC   <invalid>                               no


CERTIFICATE AUTHORITY   EXPIRES                  RESIDUAL TIME   EXTERNALLY MANAGED

ca                      Apr 13, 2031 06:46 UTC   8y              no

etcd-ca                 Apr 13, 2031 06:46 UTC   8y              no

front-proxy-ca          Apr 13, 2031 06:46 UTC   8y              no

===========================================

renew the certificate

amikum@~:03:07:35(⎈ |local-cluster:default):sudo kubeadm certs renew apiserver-etcd-client

[renew] Reading configuration from the cluster...

[renew] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'

[renew] Error reading configuration from the Cluster. Falling back to default configuration


certificate the apiserver uses to access etcd renewed


amikum@~:03:09:06(⎈ |local-cluster:default):sudo kubeadm certs check-expiration


CERTIFICATE                EXPIRES                  RESIDUAL TIME   CERTIFICATE AUTHORITY   EXTERNALLY MANAGED

admin.conf                 Jan 12, 2024 03:08 UTC   1y                                      no

apiserver                  Jun 08, 2023 09:36 UTC   364d            ca                      no

apiserver-etcd-client      Jun 08, 2023 09:37 UTC   364d            etcd-ca                 no

apiserver-kubelet-client   Jun 08, 2023 09:38 UTC   364d            ca                      no

controller-manager.conf    Jun 08, 2023 09:38 UTC   364d                                    no

etcd-healthcheck-client    Jun 08, 2023 09:38 UTC   364d            etcd-ca                 no

etcd-peer                  Jun 08, 2023 09:38 UTC   364d            etcd-ca                 no

etcd-server                Jun 08, 2023 09:38 UTC   364d            etcd-ca                 no

front-proxy-client         Jun 08, 2023 09:38 UTC   364d            front-proxy-ca          no

scheduler.conf             Jun 08, 2023 09:38 UTC   364d                                    no


CERTIFICATE AUTHORITY   EXPIRES                  RESIDUAL TIME   EXTERNALLY MANAGED

ca                      Apr 13, 2031 06:46 UTC   8y              no

etcd-ca                 Apr 13, 2031 06:46 UTC   8y              no

front-proxy-ca          Apr 13, 2031 06:46 UTC   8y              no

=======================

Regenerate new admin kubeconfig

root@NO2ECIVM03:/etc/kubernetes# kubeadm init phase kubeconfig admin

I0608 15:27:16.743911   30150 version.go:254] remote version is much newer: v1.24.1; falling back to: stable-1.21

[kubeconfig] Writing "admin.conf" kubeconfig file


No comments:

Post a Comment

Renew k8s certificates

Check If certificate expires: amikum@~:03:06:54(⎈ |local-cluster:default):sudo kubeadm certs check-expiration CERTIFICATE                EXP...