docs.rancherdesktop.io
docs.rancherdesktop.io copied to clipboard
Hello World Example #2 requires additional details.
When following the instructions in the Hello World example number 2 I end up with a pod which fails to start with an 'ErrImageNeverPull' error. If you dig into the pod logs you find 'Container image "nginx-helloworld:latest" is not present with pull policy of Never'. I assumed that this meant that my local docker repository on my laptop was not accessible by my kubernetes cluster. After a lot of searching I managed to work out that if I ran k3d image import nginx-helloworld:latest -c mycluster that the docker image is imported to my cluster and then becomes available. Is there anywhere within the docs which outlines a permanent fix or could this information be added to the instructions?
It could be that my set up was incorrect but I could not see anything in the instructions for quick starting to somehow link the local repository to any kubernetes cluster created and I thought I followed it pretty faithfully.
i cannot pull local image "nginx-helloworld:latest" too,but can pull k8s.gcr.io/pause i dont know something wrong,
Hello all! I have tried to reproduce this error ErrImageNeverPull but following the steps for the Rancher Desktop Hello World Example 2 was successful in my testing and I was able to deploy the container using both containerd and dockerd.
Are you still facing this type of error and could you please elaborate on your environment a bit more? Additionally, this could possibly be a networking issue if working behind a VPN. For Windows users, we have recently added an experimental network stack feature to help users working behind a corporate VPN that may face possible DNS/Routing issues.
I think this issue can be closed; the example works as-is. It does mention that you have to use --image-pull-policy=Never, and the sample command includes it.
The quoted error message Container image "nginx-helloworld:latest" is not present with pull policy of Never indicates that the example instructions were not followed correctly.
I gave this ago again today with a fresh install (I had actually uninstalled Rancher Desktop ages ago), the latest version of the app and using docker and can no longer reproduce this issue. I would be happy to chalk it down to user error, incorrect set up or something that has been subsequently fixed (although it seems as though another user did have the same error at the time). I would however say that the original error Container image "nginx-helloworld:latest" is not present with pull policy of Never indicates that the --image-pull-policy=Never flag was being used at the time (and I remember trying with and without this flag in testing).
I would however say that [...] that the
--image-pull-policy=Neverflag was being used at the time
Apologies, that was my mistake! It seems more likely that the namespace option (-n k8s.io) was not included in the "build" command. This could have easily happened if maybe you didn't cut & paste the sample code, but just modified the previous build command in your shell history.
I did look in the git history to see if the sample had been modified after this issue was raised, but it seems to be pretty much unchanged.
Anyways, the important thing is that it seems to be working fine now.
Thank you for confirming!