jenkins 连接k8s
使用证书连接:
通过 ~/.kube/config 生成 cert.pfx,jenkins通过 cert.pfx来连接k8s
0、生成ca.crt
echo ‘‘ "| base64 -d > ~/ca.crt (~/.kube/config中certificate-authority-data的内容)
1、生成client.key
echo ‘‘ "| base64 -d > ~/client.key (~/.kube/config中client-key-data的内容)
2、生成client.crt
echo ‘‘ "| base64 -d > ~/client.crt (~/.kube/config中client-certificate-data的内容)
3、生成cert.pfx
openssl pkcs12 -export -inkey client.key -in client.crt -certfile ca.crt -out cert.pfx
4、jenkins 上传pkcs12文件
通过 ~/.kube/config 生成 cert.pfx,jenkins通过 cert.pfx来连接k8s
0、生成ca.crt
echo ‘‘ "| base64 -d > ~/ca.crt (~/.kube/config中certificate-authority-data的内容)
1、生成client.key
echo ‘‘ "| base64 -d > ~/client.key (~/.kube/config中client-key-data的内容)
2、生成client.crt
echo ‘‘ "| base64 -d > ~/client.crt (~/.kube/config中client-certificate-data的内容)
3、生成cert.pfx
openssl pkcs12 -export -inkey client.key -in client.crt -certfile ca.crt -out cert.pfx
4、jenkins 上传pkcs12文件
相关推荐
tosim 2020-06-24
MartellJenkins 2020-06-11
ajuan 2020-06-25
limx 2020-06-11
88427810 2020-11-02
kunyus 2020-10-28
hubanbei00的家园 2020-10-25
btqszl 2020-10-21
XiaoMuFireAnt 2020-09-02
shurenyun 2020-08-19
CurrentJ 2020-08-18
hegaoye0 2020-08-18
WFMoonlight 2020-08-17
xiunai 2020-08-02
技术积累LZ 2020-07-28
lilygg 2020-07-22
akcsdno 2020-07-21
winc 2020-07-05
Dannyvon 2020-07-04