docs.rancherdesktop.io icon indicating copy to clipboard operation
docs.rancherdesktop.io copied to clipboard

Hello World Example #2 requires additional details.

Open godmar02 opened this issue 3 years ago • 1 comments

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.

godmar02 avatar May 27 '22 20:05 godmar02

i cannot pull local image "nginx-helloworld:latest" too,but can pull k8s.gcr.io/pause i dont know something wrong,

wxyer avatar May 28 '22 01:05 wxyer

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.

sunilarjun avatar Mar 22 '23 20:03 sunilarjun

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.

jandubois avatar Mar 24 '23 01:03 jandubois

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).

godmar02 avatar Mar 24 '23 10:03 godmar02

I would however say that [...] that the --image-pull-policy=Never flag 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!

jandubois avatar Mar 24 '23 17:03 jandubois