-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to pull local imagen in Kind with Podman in Windows 11 #3732
Comments
Kind has it's own container runtime in the nodes, you have to make the image available using either: https://kind.sigs.k8s.io/docs/user/local-registry/ https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster note for podman if you use I recommend local registry, which also persists across clusters and efficiently transfers layers |
I read the local-registry solution, but I need help to understand it. I see there is a script called "kind-with-registry.sh". I have Windows 11, and I saved it to a file, but I am unable to execute. It only open an editor. How can I execute it? In a console, it does nothing. |
You'll have to run it inside the linux VM running podman, sorry I don't develop on Windows or use podman desktop so I'm not sure exactly what enables that. You could manually perform the equivalent steps instead. |
I have executed the script inside the linux VM where Windows use, but I got an error because kind does not exist in this VM. How can I make work kind inside VM linux? I have seen the script makes a kind create cluster. Is it possible to use the current cluster I have created using podman desktop? Or should I create cluster using the script? |
It is, but not directly using the script, the script is just a sample and has comments about each of the steps.
That depends on the VM, you would need it installed there. (Again, I don't use this environment and can't say) But you don't actually need kind installed if you do these manually, because the script currently only uses kind to create the cluster and then list the nodes. You could run the step against your nodes yourself. |
I think you need to remove the fake "localhost" directory from the image name... It is only understood/ignored by Podman and cri-o Others like Kubernetes and containerd might try to pull the image from localhost:80 (which does not exist)? |
Finally what I did was click on "Push image to Kind cluster" from Podman-desktop, and now, the pod is created successfully, reading the image fine. Now, the issue that I have is how access to the nodePort of the service from outside of the cluster, that is, from my local computer where I have deployed my cluster with kind. As you can see in manifest app.yml, I defined a service called demo-service, whose type is NodePort, exposing to port 30080. If I call to curl demo-service:8080 from another pod, it reachs successfully to my microservice-app container. But, if I tried to call to: curl localhost:30080 from my browser, it get error: localhost rejected connection. How can I configure my cluster with Kind in order to be able to receive calls outer from the cluster? Thanks a lot!! |
Great! You will need to have extraPortMappings to access the services running in the cluster since you are actually running them inside a VM and not on your local host, even though Docker Desktop makes it look that way. More details can be found here: https://kind.sigs.k8s.io/docs/user/known-issues/#docker-desktop-for-macos-and-windows |
Thanks!! I have used: kubectl port-foward demo-app 30080:8080, and with this, I can do: http://localhost:30080 to access to my microservice |
I believe the original issue is addressed now, so closing the issue. If there is still something missing or broken, please feel free to reopen or file a new issue. Thanks! /close |
@stmcginnis: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
I have installed latest version from Podman and podman desktop (podman 5.2.2) on Windows 11.
I have installed kind extension (v0.24.0 gol.22.6).
I have created an image using podman build -t mi-microservice . using Containerfile, and image is successfully created. Indeed, I saw it in podman desktop: localhost/mi-microservice. This image consists on a microservice created by spring boot that enables a java server listening on 8080 port.
If I create a container using this image, for example, with podman run, it is successfully created, and I can reach to my microservice with a browser, at localhost://8080, and it works fine.
The issue comes when I want to deploy my image like a pod with kubernetes, using kind.
I created the following manifest for my microservice:
app.yml
This manifest contains a pod that uses my local image, and a service.
When I execute:
kubectl apply -f app.yml
This tell me the service and pod was created. But if I execute: kubectl get pod, it tells that image could not be pulled, and status is ErrImagePull.
If I create the pod using podman desktop, it works.
How can I make my manifest works with Kind? Why Kind does not load my local image? What am I doing bad?
Thanks a lot!
Best regards
Environment:
The text was updated successfully, but these errors were encountered: