Tag Archives: kubelet

[Solved] Jenkins Machine install kubelet Error: authentication failed

1. Look at jenkinsfile

2. Check the error message and the authentication fails

I can see that the authentication failed, but my Jenkins machine was successful in executing the kubectl command
[root@devops ~]# kubectl get pod 
NAME                                      READY   STATUS    RESTARTS   AGE
nexus3-7b7598945f-njgpn                   1/1     Running   1          6d6h

3. Modified

My authorization file is validated by environment variables, which are placed in /etc/profile, and /etc/profile is only loaded when the user logs in, Jenkins uses Non-login when running the command