After building the fortune pod, when I deploy it to my GKE I get an error: crashloopbackoff which usually mean I have a container that stop immediately.
When I check the logs I have something like that:
kubectl logs fortune -c html-generator
/bin/sh: 1: /bin/fortuneloop.sh: Permission denied
So it seems my script does not have the exec permission so I added in the Dockerfile the permissions:
FROM ubuntu:latest
RUN apt-get update ; apt-get -y install fortune
ADD fortuneloop.sh /bin/fortuneloop.sh
RUN chmod +x /bin/fortuneloop.sh
Hi,
After building the fortune pod, when I deploy it to my GKE I get an error: crashloopbackoff which usually mean I have a container that stop immediately.
When I check the logs I have something like that: kubectl logs fortune -c html-generator /bin/sh: 1: /bin/fortuneloop.sh: Permission denied
So it seems my script does not have the exec permission so I added in the Dockerfile the permissions: FROM ubuntu:latest
RUN apt-get update ; apt-get -y install fortune ADD fortuneloop.sh /bin/fortuneloop.sh RUN chmod +x /bin/fortuneloop.sh
ENTRYPOINT /bin/fortuneloop.sh
Now it works well.
Hope it help ! Seb