meilisearch / meilisearch-kubernetes

Meilisearch on Kubernetes Helm charts and manifests
https://www.meilisearch.com
MIT License
212 stars 59 forks source link

Pod status is never ready #91

Closed fr3fou closed 2 years ago

fr3fou commented 2 years ago

I tried running the Helm Chart with

$ helm install meilisearch charts/meilisearch -f values.yaml
image:
  repository: server_meilisearch
  tag: latest
  pullPolicy: IfNotPresent

# Environment loaded into the configMap
environment:
  MEILI_NO_ANALYTICS: true
  MEILI_ENV: development
  # For production deployment, the environment MEILI_MASTER_KEY is required.
  # If MEILI_ENV is set to "production" without setting MEILI_MASTER_KEY, this
  # chart will automatically create a secure MEILI_MASTER_KEY and push it as a
  # secret. Otherwise the below value of MEILI_MASTER_KEY will be used instead.
  # MEILI_MASTER_KEY:

This is the server_meilisearch Dockerfile image that was passed into minikube using minikube image load server_meilisearch

FROM ubuntu

WORKDIR /meilisearch

RUN apt-get update
RUN apt-get install -y \
    libc6-dev \
    curl

RUN curl -L https://install.meilisearch.com | sh
RUN chmod +x meilisearch

EXPOSE 7700

CMD ["/bin/sh", "-c", "./meilisearch"]

image This also occurs on other versions of MeiliSearch.

alallema commented 2 years ago

Hi @fr3fou! Sorry for the inconvenience, it didn't work for the M1 right now but I can propose to you this dockerfile:

FROM ubuntu

WORKDIR /meilisearch

RUN apt-get update
RUN apt-get install -y\
    libc6-dev\
    wget\
    tini

RUN wget --quiet -O meilisearch https://github.com/meilisearch/MeiliSearch/releases/download/v0.24.0/meilisearch-linux-armv8 \
    && chmod +x meilisearch

ENV MEILI_HTTP_ADDR=0.0.0.0:7700
EXPOSE 7700/tcp

ENTRYPOINT ["tini", "--"]
CMD     ./meilisearch

Let me know if it works for you.

fr3fou commented 2 years ago

image Doesn't seem to build

alallema commented 2 years ago

It's failed while fetching dependency you can try to add: apt-get update --no-cache and see if it's passed.

fr3fou commented 2 years ago

--no-cache doesn't seem to be a valid flag for apt-get update

alallema commented 2 years ago

Indeed ... You have already tried with the --fix-missing flag from the error?

fr3fou commented 2 years ago

Yeah I did, image

alallema commented 2 years ago

Ok, I'm sorry I just see that I made a mistake the --no-cache flag is for docker ... I wrote too quickly

fr3fou commented 2 years ago

Yeah, that seems to have worked – the Pod is now running, why though?

alallema commented 2 years ago

It's du to build caching, if you don't use -rm or --no-cache flag Docker will reuse the intermediate image created the last time RUN apt-get -y update executed instead of running the command again. I closed this issue then

fr3fou commented 2 years ago

I was asking why does the Dockerfile you sent work but mine doesn't ^^

alallema commented 2 years ago

Sorry I misunderstood. I don't know exactly. We should try to run some tests to see where the problem came from.