Back to Elasticsearch

Plugin management

docs/reference/elasticsearch-plugins/plugin-management.md

9.5.07.0 KB
Original Source

Plugin management

Plugins extend {{es}}'s core functionality and can serve various purposes, including:

  • National language support, phonetic analysis, and extended unicode support
  • Ingesting attachments in common formats and ingesting information about the geographic location of IP addresses
  • Adding new field datatypes to {{es}}
  • Discovery plugins, such as the cloud AWS plugin that allows discovering nodes on EC2 instances
  • Analysis plugins, to provide analyzers targeted at languages other than English
  • Scripting plugins, to provide additional scripting languages

How you add and manage plugins depends on where {{es}} runs:

  • Hosted Cloud deployments such as {{ech}} and {{ece}} expose plugin and extension management in the Cloud console and API.
  • Self-managed deployments — use a configuration file with the official Docker image, or the elasticsearch-plugin CLI for package and archive installs.
  • On {{eck}} deployments you install plugins by building a custom container image or using init containers.

::::{note} {{serverless-full}} projects {{serverless-full}} projects do not support installing plugins or uploading custom plugins and bundles. {{serverless-short}} includes core analysis plugins by default. To manage synonyms, use the synonyms API. For other differences between {{ech}} and {{serverless-short}} on plugins, bundles, and custom dictionaries, see Compare {{ech}} and Serverless. ::::

Managing plugins for {{ech}} [managing-plugins-for-ech]

{applies_to}
    ess: ga

{{ech}} simplifies plugin management by offering compatible plugins for your {{es}} version. These plugins are automatically upgraded with your deployment, except when there are breaking changes.

To add plugins to a hosted deployment, refer to:

Managing plugins for {{ece}} [managing-plugins-for-ece]

{applies_to}
    ece: ga

{{ece}} provides built-in plugins that work with your version of {{es}} and are upgraded along with your deployment, unless there are breaking changes.

To add plugins to an {{ece}} deployment, refer to:

Managing plugins for self-managed deployments [managing-plugins-for-self-managed]

{applies_to}
    self: ga

How you manage plugins depends on how you install {{es}}:

Manage plugins with the Docker image

List the plugins you want in elasticsearch-plugins.yml in your config directory. Each time the container starts, {{es}} syncs installed plugins to match that list: installing missing plugins, removing ones you deleted from the file, and upgrading official plugins when you upgrade {{es}}.

To add or remove a plugin, edit the file and restart the container. Do not use elasticsearch-plugin install or remove as those commands are disabled when elasticsearch-plugins.yml is present.

Refer to the following pages:

Manage plugins with package and archive installs [manage-plugins-with-package-and-archive-installs]

Use the elasticsearch-plugin command-line tool. It is located in the $ES_HOME/bin directory by default, but it might be in a different location depending on which {{es}} package you installed. For more information, see Plugins directory.

Run the following command to get usage instructions:

sudo bin/elasticsearch-plugin -h

:::{important} - Running as root If {{es}} was installed using the deb or rpm package, then run /usr/share/elasticsearch/bin/elasticsearch-plugin as root so it can write to the appropriate files on disk. Otherwise, run bin/elasticsearch-plugin as the user that owns all of the {{es}} files. :::

Refer to the following pages:

Managing plugins for {{eck}} [managing-plugins-for-eck]

{applies_to}
    eck: ga

On {{eck}}, {{es}} runs in Kubernetes pods. Plugins must be on disk before the main {{es}} container starts. The two supported approaches are:

  • Using a custom container image: You build a custom image from the official Elastic image with the required plugins pre-installed. This option is reproducible, works without internet access at runtime, and starts quickly, but requires a container registry and a new image for each {{es}} version upgrade.
  • Using init containers: You use an init container to run elasticsearch-plugin install before the main {{es}} container starts. This option is easier to get started with, but requires pod internet access and repeats the download on each new node.

:::{note} You can inject configuration files, such as synonym dictionaries, SAML metadata, or TLS certificates by mounting them with ConfigMaps or Secrets. However, mounting plugin files into a pod does not run elasticsearch-plugin install, so {{es}} will not load them at startup. Instead, to install plugins, use a custom container image or init container. :::