Skip to content

Instantly share code, notes, and snippets.

@zhum
Last active April 29, 2022 12:33
Show Gist options
  • Save zhum/6773044834fdd72f235fa39fd95cd57f to your computer and use it in GitHub Desktop.
Save zhum/6773044834fdd72f235fa39fd95cd57f to your computer and use it in GitHub Desktop.
kube-error-upgrade-connection
Cannot connect to any pod - get "Unable to upgrade connection".
Log:
Apr 2 03:42:59 graphit kubelet[18632]: E0402 03:42:59.173155 18632 server.go:253] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid
Meanwhile:
CERTIFICATE EXPIRES RESIDUAL TIME CERTIFICATE AUTHORITY EXTERNALLY MANAGED
admin.conf Apr 02, 2023 00:29 UTC 364d no
apiserver Apr 02, 2023 00:29 UTC 364d ca no
apiserver-etcd-client Apr 02, 2023 00:29 UTC 364d etcd-ca no
apiserver-kubelet-client Apr 02, 2023 00:29 UTC 364d ca no
controller-manager.conf Apr 02, 2023 00:29 UTC 364d no
etcd-healthcheck-client Apr 02, 2023 00:29 UTC 364d etcd-ca no
etcd-peer Apr 02, 2023 00:29 UTC 364d etcd-ca no
etcd-server Apr 02, 2023 00:29 UTC 364d etcd-ca no
front-proxy-client Apr 02, 2023 00:29 UTC 364d front-proxy-ca no
scheduler.conf Apr 02, 2023 00:29 UTC 364d no
CERTIFICATE AUTHORITY EXPIRES RESIDUAL TIME EXTERNALLY MANAGED
ca Mar 01, 2030 13:36 UTC 7y no
etcd-ca Mar 01, 2030 13:36 UTC 7y no
front-proxy-ca Mar 01, 2030 13:36 UTC 7y no
On the node:
root@cn07:~# openssl x509 -in /etc/kubernetes/pki/ca.crt -text
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 0 (0x0)
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN = kubernetes
Validity
Not Before: Mar 3 13:36:01 2020 GMT
Not After : Mar 1 13:36:01 2030 GMT
Subject: CN = kubernetes
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
...
# kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.5", GitCommit:"e6503f8d8f769ace2f338794c914a96fc335df0f", GitTreeState:"clean", BuildDate:"2020
-06-26T03:47:41Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020
-02-11T18:07:13Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment