Create first pipeline

I am on the Section 2-10:Pipeline.
I have configure jenkins, minikube, docker on my windows 11 using WSL2.
However while trying the first pipeline which find the versions of docker, maven and kubernetes,
even after configuring the authenticaion for kubernetes, i receive the following error:

  • docker -v
    Docker version 24.0.7, build afdd53b
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] stage
    [Pipeline] { (kubernetes version)
    [Pipeline] withKubeConfig
    [Pipeline] {
    [Pipeline] sh
  • kubectl version
    error: error loading config file “/var/lib/jenkins/workspace/Verions/.kube17806414685342613723config”: illegal base64 data at input byte 64
    [Pipeline] }
    [kubernetes-cli] kubectl configuration cleaned up
    [Pipeline] // withKubeConfig
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] // node
    [Pipeline] End of Pipeline
    ERROR: script returned exit code 1
    Finished: FAILURE

please advice, thanks

I looks like you kubeconfig is invalid.

Hi al1,
I have follow the lecture to copy the content of /.kube/config.
However, the difference is mine refer to other file for the ca-cert, client-key and client-cert,
if i continue to use them, my error is permission to open these 3 files denied.
so i copy and paste them in the config just like the one in lecture, and got this error,
this file .kube17806414685342613723config is not there in /var/lib/jenkins/workspace/Verions/

here is the kubeconfig file:
apiVersion: v1
clusters:

  • cluster:
    server: https://api.sandbox-m3.1530.p1.openshiftapps.com:6443
    name: api-sandbox-m3-1530-p1-openshiftapps-com:6443
  • cluster:
    certificate-authority-data: MIIDBjCCAe6gAwIBAgIBATANBgkqhkiG9w0BAQsFADAVMRMwEQYDVQQDEwptaW5p
    a3ViZUNBMB4XDTIzMDgwNTA3MTAwMloXDTMzMDgwMzA3MTAwMlowFTETMBEGA1UE
    AxMKbWluaWt1YmVDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALIn
    Xxp5FO15zoSG3Zy86OsulsGvSUo3gfPhHHRpiAfHmcEIb89bgdCLBfxS6yu4q2gx
    3Y4BeUs6gYAu+aQZIZHVd2ywmL8b25+HrZWPFamsrV+QZTIPSOjcKf0FpjZiqLNz
    TEwfLU0kFtnvr013m9aM2lgVn7lrgfDo3+mDMXg5CDoNAqQKloOrrazv+0k70z+z
    +RgimZo+zpbj/+W1XyWxdj6aPsI441pzaz+66qSMXxPjtQrhAcdgBG0nzN65SmUf
    yDqV693ZqyCH5lJIkckZ01Bm8LdDpEnyRAL6iKzKN8gZfOp0zzzWCCwzUvrL8B7o
    BG209XFK183nMgAZ6JMCAwEAAaNhMF8wDgYDVR0PAQH/BAQDAgKkMB0GA1UdJQQW
    MBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
    BBQWucTKFlS6BZf8dG4MlX3jHqhHZzANBgkqhkiG9w0BAQsFAAOCAQEAaBULY5sO
    ZNYh3nuSSwAcbrT1e5mqNvKMEdKiw98DnV5SkFjjscUmgQN3uiAQA/1O2WPYgMvK
    vJ6/uiyPSO6hTl4saR9WmMrOedcJ9UR+foPZ/dLsRPdKD+5EsSexFUEDdA1fSzKK
    BmjJQ7n76ZsYADqNjSbhjkpNGd8KSAWXx0/gVuFPaqpykZyt1J+XD4oZL8yfR8Ip
    WZUqOLy8ZzqEBgNGnLlVvoDs3oi58N40GVF0RgciDNRV9ihGC4nya+QUQo3amdo4
    tJJ5+a/fjcZAToGMmCKeL3wSFvgR5Z5+YSygHiwZLdqFeADT097kPGlFa6jL67c5
    vY1Lycc3LtOOAA==
    extensions:
  • context:
    cluster: api-sandbox-m3-1530-p1-openshiftapps-com:6443
    namespace: kel-line-dev
    user: kel-line/api-sandbox-m3-1530-p1-openshiftapps-com:6443
    name: kel-line-dev/api-sandbox-m3-1530-p1-openshiftapps-com:6443/kel-line
  • context:
    cluster: minikube
    extensions:
    • extension:
      last-update: Tue, 12 Dec 2023 13:13:54 +08
      provider: minikube.sigs.k8s.io
      version: v1.31.1
      name: context_info
      namespace: default
      user: minikube
      name: minikube
      current-context: minikube
      kind: Config
      preferences: {}
      users:
  • name: kel-line/api-sandbox-m3-1530-p1-openshiftapps-com:6443
    user:
    token: sha256~KRv9qEKBOcWyEy5HRKL0Og7pUNWb5K7ZnVFxRyCVyIY
  • name: minikube
    user:
    client-certificate-data: MIIDITCCAgmgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAVMRMwEQYDVQQDEwptaW5p
    a3ViZUNBMB4XDTIzMTExNzA3MTAxMFoXDTI2MTExNzA3MTAxMFowMTEXMBUGA1UE
    ChMOc3lzdGVtOm1hc3RlcnMxFjAUBgNVBAMTDW1pbmlrdWJlLXVzZXIwggEiMA0G
    CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDs248JBWefzzry3XMoFo3Zplv1wYVX
    BYaIgm+dTo3Ps+0CCrCJ4b0TABhKeiP0ZSDyla6gQ1hB9mdfvyDSiIjnQxelSilP
    2g8JmQODpdhGj7SfzOxeqz0NVkSi9vqo/BuHzJt5gtLlXgoRiUNLGvNJ9pGs7plJ
    0e5pS29u/5JIXsSzH1oUZhwlCTmfnstN+W2tOaH+75cuAbXxkdm5Yu9FQSE6+u3Z
    H9tzCQukopsN7z8gKUlvb+ZF86Zs0eYrC/T/z8EaSuHSzr1r41YBPztDzj0QH/xy
    zv468JlTrLq0Uz3z8XnYxVrqSMXhlagF4opLYMVfBDZI1OP0dTzhUiCVAgMBAAGj
    YDBeMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUH
    AwIwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBQWucTKFlS6BZf8dG4MlX3jHqhH
    ZzANBgkqhkiG9w0BAQsFAAOCAQEAKolNYwO40Hp7dLwpKkwIv9ruG+Sz+UrCCFwY
    KVvRfUKApJr3an+qg0Sm4v92X1ihVoiOAfb4XQPTbR3eGMrv7pIB2j+/j0aD5Hqe
    DFlfDpgMhWvKFPrTiZgoBhhUU3k4ibgSdE5r3bn+dFUrC/IVvELGdNoZ3/v1sEnv
    nuFJVeacHvtEkuRt2Z+d5X8lGoB40rHaeuKMdlalB2GoaDRc7GCaST/0HbvcNgDA
    uFvcx1FTEjdEr4D8whpsZ2OAfIbDdW+yWHazhmhUTB6/wys3ycOZJrNuXBm5jUuC
    tugxys+/YKIrJ+f6hCS39jt1kYzHiPMbIJ4sr3MtyMThmnrdaQ==
    client-key-data: MIIEpAIBAAKCAQEA7NuPCQVnn8868t1zKBaN2aZb9cGFVwWGiIJvnU6Nz7PtAgqw
    ieG9EwAYSnoj9GUg8pWuoENYQfZnX78g0oiI50MXpUopT9oPCZkDg6XYRo+0n8zs
    Xqs9DVZEovb6qPwbh8ybeYLS5V4KEYlDSxrzSfaRrO6ZSdHuaUtvbv+SSF7Esx9a
    FGYcJQk5n57LTfltrTmh/u+XLgG18ZHZuWLvRUEhOvrt2R/bcwkLpKKbDe8/IClJ
    b2/mRfOmbNHmKwv0/8/BGkrh0s69a+NWAT87Q849EB/8cs7+OvCZU6y6tFM98/F5
    2MVa6kjF4ZWoBeKKS2DFXwQ2SNTj9HU84VIglQIDAQABAoIBAHOuKAW35gxfIeNL
    1NpXaaBLZ853XbBKupIhYnHp08kFj1PX9LDi131YJoT5cmYCnjzcbhVHzusodQSG
    THmGxZZtZjcMKXEehwmg+d5qOV79ALKrWyZBa+f/ojYVegbeWnPQsn5+LpJng3Nd
    HsinuPr+uddEEQnExjQW663ClKdS8SYu4zIpDEpRV502hu0aYfUzsDiMn0kST7HN
    +37gJUjCam7LZ9KCQyGunOURdY7FhWNZKHOHh87dVGbP9TG8vtzCDy6A/PMBTwmp
    3iVZYA0LNJDisgWSsmMcVG3ZcoTNmb9OvPWFH4Ip3OWRQ0kBul1w8Emg3JfyDwfb
    paHdeAECgYEA9xnC+TMPif5H4uW5Q3hkcmWhzwd3zDACcSRLTfLs2Keo+UUOtuyH
    fZbh8q0z/4etnfZl3dzn40ebB96O3XGSKM/jYT7rfgvV8dA4yiVqnKpTeLhBHQsl
    NHdYTVgNuBIRFB9lDMRYO7jVDiUsWJC1XpvTW4YLYQiMdeaBuIDBpMECgYEA9WNb
    qeCqFRmHi7dqhS6Sv+fkTjreS/A6UeK6khIgD4GSXzuuvKrd76XhXcisRGBabAyp
    ik+rDFkZL2Hi1YYUwxbl8czIbILXw2Tz3566ynDznrAcRik9uC+cNBl0ZNz+q/+b
    G7jZNu/bgd2yoRVJzvrFauosrJ1j84KCOLQ7DNUCgYEAjcsbpfJV/WKMD7ixOfVQ
    9pA5bNqlNOdrz077Y2x92slC3l9xVSifi0LUv3QCfaR2zUlCJTEJY9OIM9jTdGEi
    dQbuPLRlX/wctdk9bUpRRjs7EO/ydV8a52OAqUlY/gJoCHsHem8FDqg+ohJUwzGu
    0e5rN37Q8sp8B3/RenVwKUECgYEA3lahdmHXGfkgxKpy/Kt/UhyV04ApbRsEbK+H
    ptR/ci1P57QXFmGnZ/2gHq61z9qR83bhoy2eaTjNxg3mTtwHMeEshhOrwg4n26Y8
    BfE3hDgltTIS3Et/3cRdvyMVQFKw+j1GWC77uXhJJvkuYh/82WqEt+PoiJqvNrOY
    tDIxkuUCgYBPkJ4IWJDlkz40sfjYFjlhv9rwUiRk1N0ZVcge8iBMU1lOU+hRcgzr
    0LMc25qttbASUVd13Sqfqge5UQxOA9JqB4qeLkQFPoHBVI2Bkqba7egP3gVYcZUQ
    K5aRDz1JCkkkc166pf9vvt8VG9FJMdq2/laTwuewFMzG9vsiiOLATw==

here is the picture of the indentation, the text pasted before have all gone wrong.


Hi there, i have solved the issue with coding base64 of the data before copy and paste. Thanks.

@kel_line How to do encoding with base 64?

use this command: cat /home/…/client.crt | base64 -w 0 ; echo
replace the path with yours, what file to decode can be found from the /.kube/config