AUTHENTICATION.GO:65] UNABLE TO AUTHENTICATE THE REQUEST DUE TO AN ERROR: X509: CERTIFICATE HAS EXPIRED OR IS NOT YET VALID

created at 11-16-2021 views: 35

k8s cluster metrics-server component reported error 

authentication.go:65] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid

reason

After the k8s cluster certificate is updated, it does not automatically restart. The component of the right side is solved after executing the following command.

docker ps |grep -E 'k8s_kube-apiserver|k8s_kube-controller-manager|k8s_kube-scheduler|k8s_etcd_etcd' | awk -F ' ' '{print $1}' |xargs docker restart

metrics-server

created at:11-16-2021
edited at: 11-16-2021: