https://rancher.com/ logo
Title
m

microscopic-garage-54074

04/07/2023, 4:57 AM
Sorry for the newb question but is there a way to list out the images which I have imported to my cluster. In minikube you can do
minikube image ls
. Is there an equivalent command for k3d?
r

rough-farmer-49135

04/07/2023, 10:40 AM
Does
docker image ls
do what you're looking for?
It's not exactly the same, but from using k3d with a standalone cluster I can say that adding images to the local docker daemon was sufficient for the k3d cluster to find them.
m

microscopic-garage-54074

04/07/2023, 5:50 PM
@rough-farmer-49135 Thank you for the comment. Are you saying you did not need to load the image using the
import
statement?
r

rough-farmer-49135

04/07/2023, 5:55 PM
With K3D your cluster can get to any docker registry that your host can, and if you're air gapped then it can reference images that are known to your local docker daemon. So you can do
docker pull ${IMAGE_NAME}
or
docker load -i ${IMAGE_TARFILE}
and then reference the same containers in your cluster. However if you can pull from a container registry to get it you don't need to do those.
If you do bring them as tarfiles to an air gapped system and use
docker load -i ${IMAGE_TARFILE}
then you may need to do
docker image ls
to verify what the docker daemon loads it as (name, potential host, & version, which will match what it was on the host that created it so if you created it then you won't need to check).
m

microscopic-garage-54074

04/07/2023, 5:59 PM
@rough-farmer-49135 Perfect. Thank you for the explanation 🙂
👍 1