The basic commands are nearly identical to the commands you would use to build a container with dockerd(moby). The main difference is that unlike dockerd, containers built with nerdctl are not available in Kubernetes by default.

To build a container that is available in Kubernetes you must specify the k8s.io namespace


# -n specifies the k8s.io namespace
nerdctl -n k8s.io build . -f containerfile -t app:0.0.1
# the container is visible inside Kubernetes
kubectl create deployment quick-test --image=app:0.0.1