证书到期时间查看
S3桶中证书存放位置
kops配置文件存储桶中存放了kubernetes集群的证书文件。可以把这些证书下载下来,然后通过命令行或其他方式查看证书的创建/过期时间。
命令行查看证书到期时间
可以把这些文件夹中的crt文件,下载下来。通过linux命令行查看。
[root@xx crt]# ll
total 56
-rw-r--r-- 1 root root 1074 Aug 25 11:32 apiserver-aggregator-ca.crt
-rw-r--r-- 1 root root 1082 Aug 25 12:13 apiserver-aggregator.crt
-rw-r--r-- 1 root root 1082 Aug 25 12:15 apiserver-proxy-client.crt
-rw-r--r-- 1 root root 1042 Aug 25 12:16 ca.crt
-rw-r--r-- 1 root root 1090 Aug 25 12:16 kops.crt
-rw-r--r-- 1 root root 1094 Aug 25 12:19 kubecfg.crt
-rw-r--r-- 1 root root 1094 Aug 25 12:19 kubecfg.crt.0
-rw-r--r-- 1 root root 1090 Aug 25 12:17 kube-controller-manager.crt
-rw-r--r-- 1 root root 1066 Aug 25 12:19 kubelet-api.crt
-rw-r--r-- 1 root root 1066 Aug 25 12:19 kubelet-api.crt.0
-rw-r--r-- 1 root root 1090 Aug 25 12:20 kubelet.crt
-rw-r--r-- 1 root root 1074 Aug 25 12:17 kube-proxy.crt
-rw-r--r-- 1 root root 1078 Aug 25 12:19 kube-scheduler.crt
-rw-r--r-- 1 root root 1464 Aug 25 12:20 master.crt
[root@xx crt]# for i in `ls *.crt`;do echo ====$i====; openssl x509 -in $i -noout -dates;done
====apiserver-aggregator-ca.crt====
notBefore=Aug 10 15:00:45 2021 GMT
notAfter=Aug 10 15:00:45 2031 GMT
====apiserver-aggregator.crt====
notBefore=Aug 10 15:00:47 2021 GMT
notAfter=Aug 10 15:00:47 2031 GMT
====apiserver-proxy-client.crt====
notBefore=Aug 10 15:00:48 2021 GMT
notAfter=Aug 10 15:00:48 2031 GMT
====ca.crt====
notBefore=Aug 10 15:00:45 2021 GMT
notAfter=Aug 10 15:00:45 2031 GMT
====kops.crt====
notBefore=Aug 10 15:00:48 2021 GMT
notAfter=Aug 10 15:00:48 2031 GMT
====kubecfg.crt====
notBefore=Aug 10 15:00:46 2021 GMT
notAfter=Aug 10 15:00:46 2031 GMT
====kube-controller-manager.crt====
notBefore=Aug 10 15:00:47 2021 GMT
notAfter=Aug 10 15:00:47 2031 GMT
====kubelet-api.crt====
notBefore=Aug 10 15:00:47 2021 GMT
notAfter=Aug 10 15:00:47 2031 GMT
====kubelet.crt====
notBefore=Aug 10 15:00:48 2021 GMT
notAfter=Aug 10 15:00:48 2031 GMT
====kube-proxy.crt====
notBefore=Aug 10 15:00:47 2021 GMT
notAfter=Aug 10 15:00:47 2031 GMT
====kube-scheduler.crt====
notBefore=Aug 10 15:00:47 2021 GMT
notAfter=Aug 10 15:00:47 2031 GMT
====master.crt====
notBefore=Aug 10 15:00:59 2021 GMT
notAfter=Aug 10 15:00:59 2031 GMT