https://rancher.com/ logo
#rancher-desktop
Title
# rancher-desktop
a

adamant-kite-43734

06/09/2022, 4:03 PM
This message was deleted.
f

fast-garage-66093

06/09/2022, 4:31 PM
Your
nerdctl run
command did not specify the
<http://k8s.io|k8s.io>
namespace, so tries to locate the image in
default
, where it doesn't exist. It works like this:
Copy code
$ nerdctl -n <http://k8s.io|k8s.io> run -p 8888:8888 l_jupyter:latest
Entered start.sh with args: jupyter lab
Executing the command: jupyter lab
[I 2022-06-09 16:30:13.062 ServerApp] jupyterlab | extension was successfully linked.
👍 1
Your deployment fails because you specify
imagePullPolicy: Always
, which tells kubelet to ignore the local image and pull a copy from dockerhub, where the repository does not exist. You need to change the policy to
Never
for it to use the locally built image.
👍 2
i

icy-parrot-30770

06/09/2022, 8:39 PM
@fast-garage-66093 I have tried to pull in both default & k8s.io without any success but changing "imagePullPolicy" make the trick !! many many many thanks !!!! it is brilliant !!
f

fast-garage-66093

06/09/2022, 10:39 PM
You should actually not use
nerdctl -n <http://k8s.io|k8s.io> run ...
because the namespace is owned by k8s, and kubelet will eventually kill your container because it is not owned by a Pod. So if you want to run the plain container, build and run in the
default
namespace
i

icy-parrot-30770

06/20/2022, 4:14 PM
@fast-garage-66093 sorry for the late response, no issue with k8s namespace up to now... but you are right, as it is recommanded as a best practice to use dedicated namespaces, I changed to use a dedicated one
5 Views