-
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
Failed to pull image on docker with mac #1392
Comments
Hey @shavo007, I'm not sure if this is a skaffold bug -- it seems like there's a network connection issue in your cluster? |
hi @priyawadhwa , i can definitely run on my local k8s cluster directly the problem is when using skaffold postgres spins up but not my api
i am not sure if its an issue with my docker file using multi phase build or two containers running within the same pod?
|
Can you check if your image is in docker hub? I suspect that it is not. You can actually see that your image tag is da972dd-dirty-ca0890b. What i do is that i instruct skaffold not to push, by indicating that its a local build.
I think skaffold uses some context to determine if it requires to push or not. If the context is minukube it doesn't do that. |
hi @balchua the docker image exists in docker hub but not that tag that image tag i believe is generated by skaffold locally i am running more info in the repo here https://github.com/shavo007/graphql-playground/tree/master/api#skaffold if you want to replicate |
I can't test this right now, but can u try this skaffold config?
|
I look at your deployment manifest, you useimagePullPolicy: Always which will definitely fail if the image is not pushed to the registry. Use imagepullpolicy IfNotPresent. You should be good to go. |
all good @balchua , that works now. thanks ;-) see commit change here shavo007/graphql-playground@ccc2410 it might be worth noting that in the docs? also i know from best practices, that imagePullPolicy should be Always. Its probably not a good idea if you are running locally |
First of all, great that you got it right. From my experience running kube is that i want to start the pod faster. If you have a large image, every time you start that container it will always look up to the registry and pull it. I personally feel that imagePullPolicy: IfNotPresent is the best practice. ImagePullPolicy is well documented in kubernetes. |
Ye, i had a look at the doc before. It states:
I remember when I took the kubernetes CKA exam, i read many places to set to But i guess there is no hard rule!! Happy to close, or you want an update to the doc to outline if imagePullPolicy set to |
Maybe a PR to update the documentation just to highlight this thing. Or you can close as you wish. Thanks again |
Related to this issue GoogleContainerTools#1392
Expected behavior
Run the pod on kubernetes
Actual behavior
Fails to pull image
Information
Steps to reproduce the behavior
kubectl describe pod
I have a multi phase build for my api. my k8s deployment is running two containers (graphql-api, postgres)
postgres starts fine but not my api
src code can be found here https://github.com/shavo007/graphql-playground/tree/master/api
The text was updated successfully, but these errors were encountered: