使用證書鏈接:
經過 ~/.kube/config 生成 cert.pfx,jenkins經過 cert.pfx來鏈接k8s
0、生成ca.crt
echo '' "| base64 -d > ~/ca.crt (~/.kube/config中certificate-authority-data的內容)
一、生成client.key
echo '' "| base64 -d > ~/client.key (~/.kube/config中client-key-data的內容)
二、生成client.crt
echo '' "| base64 -d > ~/client.crt (~/.kube/config中client-certificate-data的內容)
三、生成cert.pfx
openssl pkcs12 -export -inkey client.key -in client.crt -certfile ca.crt -out cert.pfx
四、jenkins 上傳pkcs12文件ide