ElasticSearch on Kubernetes on RPi4

Hi all

Looking at putting together a "little" lab.
Thinking of building up to 4 or 5 RPI4's with 4GB each.
Want to then drop K8S onto them.
Not sure how I will do persistent storage, as a start might just give them each a 64GB SD card and carve that up.

Has anyone gotten this working, aka ElasticSearch and Kibana on RPi4's on K8S ?
Otherwise a straight 4 x ElasticSearch on Native Raspberry, on base OS.

G

May be @ineumann had done similar things?

2 Likes

Just a quick point of clarification, it's Elasticsearch and not ElasticSearch :slight_smile:

1 Like

NOTED :slight_smile:

G

Yeah indeed ^^

In order to be able to use easily Elasticsearch and Kibana on raspberrypi (with arm32 and aarch64 operating system) I made available on dockerhub, the following OCI images:

Here's the git repository containing the Dockerfiles and documentations: oss / elasticstack / elasticstack-arm · GitLab (the docker images are built on raspberrypi using as gitlab runners then pushed on the dockerhub).

I'll keep them up to date with the right tags until elastic will take care of it. They're already providing aarch64 images but until raspberrypi OS deliver a stable version of an aarch64 operating system, the marority of those devices are still running on a 32 bits OS.

Here's an example of docker-compose file you can use on a single raspberrypi:

version: "3.3"

services:
  es01:
    image: comworkio/elasticsearch:7.13.2-1.7-arm
    container_name: es01
    ports:
      - 9200:9200
      - 9300:9300
    networks:
      - rpies
    volumes:
      - data01:/usr/share/elasticsearch/data
  kib01:
    image: comworkio/kibana:7.13.2-1.7-arm
    container_name: kib01
    ports:
      - 5601:5601
    environment:
      - ES_PROTO=http
      - ES_HOST=es01
      - ES_PORT=9200
    networks:
      - rpies
    depends_on: 
      - es01

volumes:
  data01:
    driver: local

networks:
  rpies:
    driver: bridge

Then here you go with:

docker-compose up -d

Then your kibana is accessible on http://{your_raspberrypi}:5601 and your elasticsearch api on http://{your_raspberrypi}:9200. This is working pretty fine with a raspberrypi 4 model B 8gb ram. If you're using 4gb of ram models, I would recommend to use two of them or maybe you don't need to use Kibana for your project. I also advise you tu use a model 4 in order to be able to boot on a SSD drive instead of an SD flash.

If your using K8S instead of docker-compose, you can handle by yourself to make your own helmchart or kustomize with the same OCI images. You also can use kompose to make it quick, I also made an api for that purpose: oss / kompose-api · GitLab

For the french speakers, here's a demo using those images: Elastic Paris Meetup #56 : Suivre l'évolution du covid sur RaspberryPI avec la suite Elastic - YouTube

And the repository of the project seen in this video with some documentations (in english): oss / covid19 · GitLab

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.