Type to search.

Create custom images

ECK

Elastic Cloud on Kubernetes extends Kubernetes orchestration capabilities to allow you to deploy and manage components of the Elastic Stack.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

You can create your own custom application images (Elasticsearch, Kibana, APM Server, Beats, Elastic Agent, Elastic Maps Server, Logstash, AutoOps Agent Policy and Package Registry) instead of using the base images provided by Elastic. You might want to do this to have a canonical image with all the necessary plugins pre-loaded rather than installing them through an init container each time a Pod starts. You must use the official image as the base for custom images. For example, if you want to create an Elasticsearch 9.5.6 image with the ICU Analysis Plugin, you can do the following:

  1. Create a Dockerfile containing:

    Shell
    FROM docker.elastic.co/elasticsearch/elasticsearch:9.5.6
    RUN bin/elasticsearch-plugin install --batch analysis-icu
    
  2. Build the image with:

    Shell
    docker build --tag elasticsearch-icu:9.5.6 .
    

There are various hosting options for your images. If you use Google Kubernetes Engine, you can store your custom images in Artifact Registry. Before you push an image, create a Docker repository and configure authentication. Make sure that your cluster has permission to pull images from the repository.

Shell
docker tag elasticsearch-icu:9.5.6 ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPOSITORY}/elasticsearch-icu:9.5.6
docker push ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPOSITORY}/elasticsearch-icu:9.5.6

Configure your Elasticsearch specification to use the newly pushed image, for example:

YAML
spec:
  version: 9.5.6
  image: ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/${REPOSITORY}/elasticsearch-icu:9.5.6
Note

Providing the correct version is always required as ECK reasons about APIs and capabilities available to it based on the version field.

The steps are similar for Azure Kubernetes Service and AWS Elastic Container Registry.

If your custom images follow the naming convention adopted by the official images, and you only want to use your custom images, you can also simply override the container registry.

For more information, check the following references: