其他分享
首页 > 其他分享> > 项目环境搭建【Docker+k8s】三 || 准备签发证书环境

项目环境搭建【Docker+k8s】三 || 准备签发证书环境

作者:互联网

目录

1、部署主机

2、安装证书签发工具CFSSL:R1.2

#CFSSL
wget "https://pkg.cfssl.org/R1.2/cfssl_linux-amd64" -O /usr/bin/cfssl
#CFSSL-json
wget "https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64" -O /usr/bin/cfssl-json
#CFSSL-certinfo
wget "https://pkg.cfssl.org/R1.2/cfssl-certinfo_linux-amd64" -O /usr/bin/cfssl-certinfo
#给执行权限
chmod +x /usr/bin/cfssl*
#查看路径
which cfssl,cfssl-json,cfssl-certinfo

3、创建生成CA证书签名请求(csr)的json配置文件

mkdir -p /opt/certs 
vi ca-csr.json
{
  "CN": "KevinEdu",
  "hosts": [ ],
  "key": {
    "algo": "rsa",
    "size": 2048
  },
  "names": [
    {
      "C": "CN",
      "ST": "YN",
      "L": "KM",
      "O": "kevin",
      "OU": "edu"
    }
  ],
  "ca": {
    "expiry": "175200h"
  }
}
[root@yn101-100 certs]# cfssl gencert -initca ca-csr.json | cfssl-json -bare ca
[root@yn-100 certs]# ls
ca.csr  ca-csr.json  ca-key.pem  ca.pem

标签:证书,ca,R1.2,环境,json,cfssl,Docker,k8s,csr
来源: https://www.cnblogs.com/kevin-ying/p/12343580.html