This message was deleted.
# rancher-desktop
a
This message was deleted.
f
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
@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
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
@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