-
Hi all, I'm doing a simple web app that consists in a visitor counter every time the page is reloaded. To do it I have a script in JavaScript and I need to connect it to a HTML file which acts as the web by itself, and the base image I want is My FROM nginx:latest COPY ./index.html /usr/nginx/share/html/index.html COPY ./index.js /usr/nginx/share/html/index.js COPY ./styles.css /usr/nginx/share/html/styles.css When I run this separately (
NAME READY STATUS RESTARTS AGE meep-ams-667d8fd654-j49vh 1/1 Running 0 112m meep-app-enablement-7bc99dc6d4-nkzn6 1/1 Running 0 111m meep-gis-engine-7fdc57f844-nx7cr 1/1 Running 0 112m meep-loc-serv-59dd45c974-4xhg8 1/1 Running 0 112m meep-metrics-engine-679847c579-pvbh2 1/1 Running 0 112m meep-mg-manager-76b77554d6-n2dwz 1/1 Running 0 111m meep-rnis-765f646c59-4gq4p 1/1 Running 0 111m meep-sandbox-ctrl-7bb48c5bc5-hwcjp 1/1 Running 0 112m meep-tc-engine-99c8cdc7c-dfsnx 1/1 Running 0 112m meep-wais-5dbd6f9986-bxh29 1/1 Running 0 111m nginx-cloud-f858cc548-wmgxr 1/2 ImagePullBackOff 0 25m nginx-edge-6dbb94d746-952v4 1/2 ImagePullBackOff 0 25m nginx-fog-744f85765-zvkt9 1/2 ImagePullBackOff 0 25m ue1-app-59c7d4df95-7sbw9 1/1 Running 0 25m I checked the events in one these pods ( Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 2m21s Successfully assigned nginx-sandbox/nginx-edge-6dbb94d746-952v4 to advantedge Normal Pulled 2m15s kubelet, advantedge Container image "busybox:1.28" already present on machine Normal Created 2m14s kubelet, advantedge Created container init-kube-dns Normal Started 2m12s kubelet, advantedge Started container init-kube-dns Normal Pulling 2m9s kubelet, advantedge Pulling image "meep-docker-registry:30001/meep-tc-sidecar:latest" Normal Pulled 2m9s kubelet, advantedge Successfully pulled image "meep-docker-registry:30001/meep-tc-sidecar:latest" in 672.276856ms Normal Created 2m8s kubelet, advantedge Created container meep-tc-sidecar Normal Started 2m7s kubelet, advantedge Started container meep-tc-sidecar Normal Pulling 29s (x3 over 2m12s) kubelet, advantedge Pulling image "custom-nginx" Warning Failed 24s (x3 over 2m9s) kubelet, advantedge Error: ErrImagePull Warning Failed 24s (x3 over 2m9s) kubelet, advantedge Failed to pull image "custom-nginx": rpc error: code = Unknown desc = Error response from daemon: pull access denied for custom-nginx, repository does not exist or may require 'docker login': denied: requested access to the resource is denied Normal BackOff 11s (x4 over 2m6s) kubelet, advantedge Back-off pulling image "custom-nginx" Warning Failed 11s (x4 over 2m6s) kubelet, advantedge Error: ImagePullBackOff Also I noticed that there's not I think that is a configuration problem between custom image and k8s, because the base image is Thank you in advance for the help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hello @rubenbc28 , This seems like a docker registry problem. More details...
To see how to push images from the local host to the meep-docker-registry, try this Command to push your image should look like this Let me know if it worked |
Beta Was this translation helpful? Give feedback.
-
Hi Rubenctl28, I am also deploying an application of my own for use with the AdvantEdge platform. I am starting with a simple web application. It has three files (.css .html .js), then I have my Dockerfile, running it separately to the platform works for me, but I would like to configure it on the platform. What did you change or add in the platform files for the correct functioning of your application. Thanks in advance, I look forward to your reply. |
Beta Was this translation helpful? Give feedback.
-
Hi @rubenbc28, thanks for the answer and the quick response, it was very helpful. But I have a couple more short questions. in the Dockerfile to create the image, do you specify a port with the "EXPOSE" command. Did you get to work the small application of the hit counter, if it was not too much to ask, if you could pass me the files to see if I solve any doubt. Thank you very much again. |
Beta Was this translation helpful? Give feedback.
Hello @rubenbc28 ,
This seems like a docker registry problem.
K8s seems unable to access your docker image called
custom-nginx
in the specified docker registry.1- What docker registry did you specify in your scenario?
2- Make sure the docker-registry is accessible from K8s
More details...
After dockerizing your image, it will be present in the docker registry of the host where you dockerized.
If this docker registry is not accessible to K8s then it will not be able to pull the container.
nginx
official image is probably accessible in a cloud registry, most certainly accessible from K8smeep-docker-registry
co…