curl -sfL https://get.rke2.io | sh - systemctl start rke2-server.service
Step 3:验证证书有效期
rke2 certificate check
执行结果:
INFO[0000] Server detected, checking agent and server certificates INFO[0000] client-rke2-controller.crt: certificate system:rke2-controller (ClientAuth) is ok, expires at 2035-07-01T07:07:52Z INFO[0000] client-rke2-controller.crt: certificate rke2-client-ca@1751526470 (CertSign) is ok, expires at 2035-07-01T07:07:50Z INFO[0000] client-admin.crt: certificate system:admin (ClientAuth) is ok, expires at 2035-07-01T07:07:50Z INFO[0000] client-admin.crt: certificate rke2-client-ca@1751526470 (CertSign) is ok, expires at 2035-07-01T07:07:50Z INFO[0000] client-auth-proxy.crt: certificate system:auth-proxy (ClientAuth) is ok, expires at ... ... ... INFO[0000] client-supervisor.crt: certificate system:rke2-supervisor (ClientAuth) is ok, expires at 2035-07-01T07:07:50Z INFO[0000] client-supervisor.crt: certificate rke2-client-ca@1751526470 (CertSign) is ok, expires at 2035-07-01T07:07:50Z INFO[0000] client-kube-proxy.crt: certificate system:kube-proxy (ClientAuth) is ok, expires at 2035-07-01T07:07:52Z INFO[0000] client-kube-proxy.crt: certificate rke2-client-ca@1751526470 (CertSign) is ok, expires at 2035-07-01T07:07:50Z
root@ip-172-31-16-225:~# rke2 certificate check INFO[0000] Server detected, checking agent and server certificates INFO[0000] client-kube-apiserver.crt: certificate system:apiserver (ClientAuth) is ok, expires at 2035-07-01T07:33:54Z INFO[0000] client-kube-apiserver.crt: certificate rke2-client-ca@1751527477 (CertSign) is ok, expires at 2035-07-01T07:24:37Z INFO[0000] serving-kube-apiserver.crt: certificate kube-apiserver (ServerAuth) is ok, expires at 2035-07-01T07:33:54Z INFO[0000] serving-kube-apiserver.crt: certificate rke2-server-ca@1751527477 (CertSign) is ok, expires at 2035-07-01T07:24:37Z INFO[0000] client-auth-proxy.crt: certificate system:auth-proxy (ClientAuth) is ok, expires at 2035-07-01T07:33:54Z ... ... ... INFO[0000] client-kube-proxy.crt: certificate rke2-client-ca@1751527477 (CertSign) is ok, expires at 2035-07-01T07:24:37Z INFO[0000] client-kubelet.crt: certificate system:node:ip-172-31-16-225 (ClientAuth) is ok, expires at 2035-07-01T07:33:56Z INFO[0000] client-kubelet.crt: certificate rke2-client-ca@1751527477 (CertSign) is ok, expires at 2035-07-01T07:24:37Z INFO[0000] serving-kubelet.crt: certificate ip-172-31-16-225 (ServerAuth) is ok, expires at 2035-07-01T07:33:55Z INFO[0000] serving-kubelet.crt: certificate rke2-server-ca@1751527477 (CertSign) is ok, expires at 2035-07-01T07:24:37Z