[root@k8s-master pki]# cd / var /lib/kubelet/pki/
[root@k8s-master pki]# openssl x509 - in kubelet.crt -text -noout
[root@k8s-master pki]# openssl genrsa - out kubelet.key 2048
[root@k8s-master pki]# openssl x509 -req - in kubelet.csr -CA /etc/kubernetes/pki/ca.crt -CAkey /etc/kubernetes/pki/ca.key - out kubelet.crt -days 3600 -CAcreateserial
[root@k8s-master pki]# cat kubelet.crt > kubelet-client-2021-03-23-21-56-34.pem
[root@k8s-master pki]# cat kubelet.key >> kubelet-client-2021-03-23-21-56-34.pem
[root@k8s-master pki]# cat /etc/kubernetes/pki/ca.crt |base64
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Fo
a2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeE1ETXlN
ekV6TlRZek1Wb1hEVE14TURNeU1URXpOVFl6TVZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVa
WFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBSm1WClBPQStz
MkpVNStMVm5CbDEvdC95S1U2U2pwS0w4N0JaMTB5RVVVU3d4RHlObFE0ZG9CSE9CME1KQlExVVJI
VGYKWDdSZ1BTeHpobExyc1d4b04zRGlla3lMWjdpaUlrNWdSZjI2YkhCVndkVDFyb1FOM0Nmem9j
blNteEFPZGpJcgo4K1A5aUEwajhaQzhGZjZRMlBNNDBSSkgwOWZDWkJSNDdkR0YzbFZYS2Eva1ov
WFNKdG8zNlYwSldTUkxyMGdUClJQUTVFWmc0SHdEN2JIKzB6bVV3dWRQWDR1ZTNGc21CWjFPUDJj
YmtneDlnQjk0eHRPN2JNZVZ6T2ZsazNrSW4KSGljSG9aTVd4L0JTcXpDejJZVFFVcGw3T3c2bGVZ
VldUdUVJcmkvTmNRakxqT2duMWZkNlRsWW9wUjBrQ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