I downloaded the source code for Rancher from github and build the image rancher/rancher using the code.Then I used this image to create the container and set up the rancher. But when I was trying to add my kubernetes cluster by registering an existing kubernetes cluster, the pods couldn’t work. I found there was no rancher/agent:dev in docker hub, so pulling the image was failed. Does anyone have ideas how to solve this problem?
You can configure Rancher to use a different agent image using -e CATTLE_AGENT_IMAGE=yourrepo/rancher-agent:dev
Thank you for getting back to me. I tried and it worked.But then another problem occured.
I installed kubernetes clusters based on kubeadmin before.I tested using "kubectl run --image=nginx nginx-app --port=80 " and the pod on k8s-node2 worked fine.But this time when I was trying to add my kubernetes cluster, the pod created on k8s-master is running but the state of the pod on the k8s-node2 is CrashLoopBackOff. The events are above in the picture. I’m really confused. How can I solve this problem?
What pod are you showing events for? And what is the log of this/these pod/pods?
The steps on the troubleshooting page usually give enough info to root cause the issue: https://rancher.com/docs/rancher/v2.x/en/troubleshooting/