This message was deleted.
# rancher-desktop
a
This message was deleted.
d
PS C:\Users\boneis\rancher\nginx> kubectl run hello-world --image=nginx-helloworld:latest --image-pull-policy=Never --port=80 pod/hello-world created PS C:\Users\boneis\rancher\nginx> kubectl port-forward pods/hello-world 8080:80 error: unable to forward port because pod is not running. Current status=Pending PS C:\Users\boneis\rancher\nginx> kubectl port-forward pods/hello-world 8080:80 error: unable to forward port because pod is not running. Current status=Pending PS C:\Users\boneis\rancher\nginx> kubectl port-forward pods/hello-world 8080:80 error: unable to forward port because pod is not running. Current status=Pending PS C:\Users\boneis\rancher\nginx> kubectl get pods NAME READY STATUS RESTARTS AGE hello-world 0/1 ErrImageNeverPull 0 24s ErrImageNeverPull ??
s
If you set
--image-pull-policy=Never
then how is the image going to be pulled to your kubernetes (Rancher Desktop) cluster?
βœ… 1
Did you push the image into the cluster yourself?
d
may be yes. ^^;
How can I push the image to my cluster(rancher-desktop)?
s
Okay. Were you following the
nerdctl
or the
docker
instructions?
d
docker
s
Okay. Just doing the
docker build --tag...
should have made the image available to your cluster. Let me just replicate the process...
d
docker build --tag nginx-helloworld:latest .
Dockerfile FROM nginx:alpine COPY . /usr/share/nginx/html index.html <h1>Hello World from NGINX!!</h1>
I did as described, but why doesn't it work?
s
Can you do
kubectl config get-contexts
just to check your kubectl config is pointing to your local Rancher Desktop context.
Copy code
$ kubectl config get-contexts 
CURRENT   NAME                             CLUSTER            AUTHINFO           NAMESPACE
*         rancher-desktop                  rancher-desktop    rancher-desktop
d
rancher-desktop
s
The instructions work exactly as expected for me...
Copy code
$ kubectl get pods
NAME          READY   STATUS    RESTARTS   AGE
hello-world   1/1     Running   0          52s
βœ… 1
Are you sure that Rancher Desktop is configured for
dockerd (moby)
d
same..
s
I'm out of ideas 😞
πŸ˜… 1
d
Thanks a lot
I succeeded It worked when I deleted docker-desktop and tried again.
Thank you very much!!
s
How curious. Oh well - at least it's working now πŸ™‚
πŸ™ 1
d
All of this is thanks to you. thank you so much.
πŸ‘ 1
147 Views