Loading

Plugin management

Plugins extend Elasticsearch'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 Elasticsearch
  • 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 Elasticsearch runs:

Note Elastic Cloud Serverless projects

Elastic Cloud Serverless projects do not support installing plugins or uploading custom plugins and bundles. Serverless includes core analysis plugins by default. To manage synonyms, use the synonyms API. For other differences between Elastic Cloud Hosted and Serverless on plugins, bundles, and custom dictionaries, see Compare Elastic Cloud Hosted and Serverless.

Elastic Cloud Hosted simplifies plugin management by offering compatible plugins for your Elasticsearch version. These plugins are automatically upgraded with your deployment, except when there are breaking changes.

To add plugins to a hosted deployment, refer to:

Elastic Cloud Enterprise provides built-in plugins that work with your version of Elasticsearch and are upgraded along with your deployment, unless there are breaking changes.

To add plugins to an Elastic Cloud Enterprise deployment, refer to:

How you manage plugins depends on how you install Elasticsearch:

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

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:

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 Elasticsearch 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 Elasticsearch 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 Elasticsearch files.

Refer to the following pages:

On Elastic Cloud on Kubernetes, Elasticsearch runs in Kubernetes pods. Plugins must be on disk before the main Elasticsearch 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 Elasticsearch version upgrade.
  • Using init containers: You use an init container to run elasticsearch-plugin install before the main Elasticsearch 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 Elasticsearch will not load them at startup. Instead, to install plugins, use a custom container image or init container.