The RESTful API is also useful for adding Elastic Stack features to existing deployments. In this example, we’ll show you how to create a new Kibana instance and associate it with an existing Elasticsearch cluster that is part of a deployment.
This example requires a deployment with an Elasticsearch cluster to work with that is not being used for anything important. If you don’t already have one, you can follow our
My First Deployment example to create one.
To add a Kibana instance to a deployment:
Create a JSON file with a basic Kibana configuration, here
There are different options you can specify, but the most important one is that you need to include an Elasticsearch cluster ID that the Kibana instance will be associated with and a Kibana instance configuration that tells ECE how to create the new Kibana instance.
Issue a POST request to create the new Kibana instance, which returns a new Kibana ID in the response:
After the configuration change is complete, your deployment now has a Kibana instance associated with it. If you switch back to the Cloud UI, you can open Kibana to test that it works as expected.