1. 创建私钥
(umask 077;openssl genrsa -out yamlops.key 2048)
2. 创建证书签署请求
openssl req -new -key yamlops.key -out yamlops.csr -subj "/CN=yamlops/O=kubernetes"
3. 签署证书
openssl x509 -req -days 3655 -CA /path/to/ca.crt -CAkey /path/to/ca.key -CAcreateserial in yamlops.csr -out yamlops.crt
4. 查看证书信息
openssl x509 -in yamlops.crt -text -noout
