Error: [service-account-issuer is a required flag, --service-account-signing-key-file and --service-account-issuer are required flags]
生成sa证书和pub
cat<<EOF > /root/k8s/certs/sa-csr.json
{
"CN":"sa",
"key":{
"algo":"rsa",
"size":2048
},
"names":[
{
"C":"CN",
"L":"BeiJing",
"ST":"BeiJing",
"O":"k8s",
"OU":"System"
}
]
}
EOF
# 此处修改自己的路径
cfssl gencert -initca /root/k8s/certs/sa-csr.json | cfssljson -bare /root/k8s/certs/sa -
openssl x509 -in /root/k8s/certs/sa.pem -pubkey -noout > /root/k8s/certs/sa.pub
# 修改apiserver的参数
--service-account-key-file=/root/k8s/certs/sa.pub
--service-account-signing-key-file=/root/k8s/certs/sa-key.pem
--service-account-issuer=api
手机扫一扫
移动阅读更方便
你可能感兴趣的文章