jenkins 连接k8s

断了今生、忘了曾经 提交于 2020-02-25 23:58:42

使用证书连接:
通过 ~/.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文件
jenkins 连接k8s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!