kubernets 使用OpenSSL生成CA证书
之前dashboard升级时需要Https请求,需要自己生成CA证书;在此记录一下 创建一个2048bit的ca.key openssl genrsa -out ca.key 2048 根据上一步创建的 ca.key 文件生成 ca.crt #-days设置有效时间 openssl req -x509 -new -nodes -key ca.key -subj "/CN=<MASTER_IP>" -days 10000 -out ca.crt 生成一个2048bit的server.key: openssl genrsa -out server.key 2048 新建文件csr.conf,内容如下替换尖括号的内容: [ req ] default_bits = 2048 prompt = no default_md = sha256 req_extensions = req_ext distinguished_name = dn [ dn ] C = <country> ST = <state> L = <city> O = <organization> OU = <organization unit> CN = <MASTER_IP> [ req_ext ] subjectAltName = @alt_names [alt_names ] DNS.1 = kubernetes