-
Notifications
You must be signed in to change notification settings - Fork 257
Rewrite Find connection details for the current UI #7954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
charlotte-hoblik
wants to merge
15
commits into
main
Choose a base branch
from
charlotte-find-connection-details-7709
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e78b349
Update page metadata
charlotte-hoblik 30cc52d
rewrite page introduction
charlotte-hoblik 11c2d24
Updated `Find your {{es}} endpoint` for stack
charlotte-hoblik 4fc0ac7
fix icon
charlotte-hoblik 65b85aa
update Find your {{es}} endpoint section
charlotte-hoblik b0d27e2
Update Find your Cloud ID section
charlotte-hoblik 29ac5d5
add create an api key section
charlotte-hoblik 618f5d4
Add test your connection, next steps and related pages sections + red…
charlotte-hoblik da14637
fix issues
charlotte-hoblik e530332
Add new connection details screenshot
charlotte-hoblik 92ec9fe
add info about new header
charlotte-hoblik bf7854a
Apply feedback from @kosabogi and @yetanothertw
charlotte-hoblik 48b32c6
Restore image
charlotte-hoblik b365007
Merge branch 'main' into charlotte-find-connection-details-7709
charlotte-hoblik d01269a
update picture
charlotte-hoblik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
184 changes: 110 additions & 74 deletions
184
solutions/elasticsearch-solution-project/search-connection-details.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,136 +1,172 @@ | ||
| --- | ||
| navigation_title: Find connection details | ||
| description: Find your Elasticsearch endpoint and create an API key so that client applications and tools can connect to your cluster or project. | ||
| mapped_pages: | ||
| - https://www.elastic.co/guide/en/kibana/current/search-space-connection-details.html | ||
| applies_to: | ||
| stack: | ||
| deployment: | ||
| ech: | ||
| ece: | ||
| eck: | ||
| self: | ||
| serverless: | ||
| products: | ||
| - id: kibana | ||
| - id: elasticsearch | ||
| type: how-to | ||
| --- | ||
|
|
||
| # Find connection details [search-space-connection-details] | ||
|
|
||
| To connect a client application or a third-party tool to {{es}}, you need two things: the {{es}} endpoint URL, and credentials that authenticate the request. For secure connections, use an API key. | ||
|
|
||
| To connect to your {{es}} deployment, you need your {{es}} endpoint URL. For secure connections, we recommend using an API key for authentication. | ||
| ## Before you begin [before-you-begin] | ||
|
|
||
| The following sections describe how to find your Cloud ID and create API keys in both {{ecloud}} and {{serverless-short}} deployments. | ||
| To create an API key, you need the `manage_api_key` or the `manage_own_api_key` cluster privilege. | ||
|
|
||
| ## Elastic Cloud and self-hosted deployments [_elastic_cloud_and_self_hosted_deployments] | ||
| ## Find your {{es}} endpoint [find-endpoint-cloud-self-managed] | ||
|
|
||
| ### Find your {{es}} endpoint [find-endpoint-cloud-self-managed] | ||
| :::::{applies-switch} | ||
|
|
||
| Elastic recommends you connect client applications to your cluster using standard URLs. | ||
| ::::{applies-item} { "deployment": { "ech": "ga", "ece": "ga" }, "serverless": "ga" } | ||
| Your endpoint is in the **Connection details** panel in {{kib}}. | ||
|
|
||
| 1. Go to the {{ecloud}} home page. | ||
| 2. In the main menu, select **Manage this deployment**. | ||
| 3. Under the **Applications** list, select **Copy endpoint** next to **{{es}}**. | ||
| 1. Open {{kib}} for your deployment or project. | ||
| 2. From the **Help menu** {icon}`question`, select **Connection details**. | ||
| 3. Copy the **{{es}} endpoint** from the **Endpoints** tab. | ||
|
|
||
| ### Find your Cloud ID [find-cloud-id-cloud-self-managed] | ||
| :::{image} /solutions/images/kibana-connection-details-endpoints.png | ||
| :alt: The Connection details panel showing the Elasticsearch endpoint on the Endpoints tab, with the Show Cloud ID toggle and the API key tab | ||
| :screenshot: | ||
| :width: 50% | ||
| ::: | ||
|
|
||
| ::::{note} | ||
| The Cloud ID is a connection method specifically supported by Beats and {{ls}}. For all other client applications and third-party tools, use the {{es}} endpoint URL. | ||
| :::: | ||
| :::{tip} | ||
|
|
||
| 1. Go to the {{ecloud}} home page. | ||
| 2. In the main menu, select **Manage this deployment**. | ||
| * When the space uses the **{{es}}** solution view, the **Getting started** page shows the endpoint directly. | ||
| * {applies_to}`serverless: ga` You can also open **Connection details** from the project selector in the header. | ||
|
|
||
| :::{image} /solutions/images/kibana-manage-deployment.png | ||
| :alt: manage deployment | ||
| :screenshot: | ||
| ::: | ||
| ::: | ||
|
|
||
| 3. The Cloud ID is displayed on the right side of the page. | ||
| :::: | ||
|
|
||
| :::{image} /solutions/images/kibana-cloud-id.png | ||
| :alt: cloud id | ||
| :screenshot: | ||
| ::: | ||
| ::::{applies-item} {"deployment": {"self": "ga"}} | ||
| Your endpoint takes the form `<scheme>://<host>:<port>`. Each part comes from your cluster's HTTP settings: | ||
|
|
||
| * **Scheme**: `https` when TLS is enabled on the HTTP layer, and `http` when it isn't. [Automatic security setup](/deploy-manage/security/self-auto-setup.md) enables TLS on a new archive or package installation. | ||
| * **Host**: The address clients use to reach the node, set by [`http.host` or `network.host`](elasticsearch://reference/elasticsearch/configuration-reference/networking-settings.md). | ||
| * **Port**: The HTTP port, set by [`http.port`](elasticsearch://reference/elasticsearch/configuration-reference/networking-settings.md). It defaults to the range `9200-9300`, and a node binds to the first free port in that range. | ||
|
|
||
| For example, a single-node cluster from the [local development quickstart](/deploy-manage/deploy/self-managed/local-development-installation-quickstart.md) runs without TLS on the default port, so its endpoint is `http://localhost:9200`. | ||
|
|
||
| ### Create an API key [create-an-api-key-cloud-self-managed] | ||
| If clients reach your cluster through a load balancer, reverse proxy, or ingress, use that address rather than the node address. | ||
| :::: | ||
|
|
||
| 1. To navigate to **API keys**, use the [**global search bar**](../../explore-analyze/find-and-organize/find-apps-and-objects.md). | ||
| ::::{applies-item} {"deployment": {"eck": "ga"}} | ||
| The {{eck}} operator creates a `ClusterIP` service named `<cluster-name>-es-http` on port `9200`, with TLS enabled by default. | ||
|
|
||
| :::{image} /solutions/images/kibana-api-keys-search-bar.png | ||
| :alt: api keys search bar | ||
| :screenshot: | ||
| ::: | ||
| From inside the Kubernetes cluster, your endpoint is `https://<cluster-name>-es-http:9200` in the same namespace, or `https://<cluster-name>-es-http.<namespace>.svc:9200` from another namespace. List your services to confirm the name: | ||
|
|
||
| 2. Select **Create API key**. | ||
| ```sh | ||
| kubectl get svc | ||
| ``` | ||
|
|
||
| :::{image} /solutions/images/kibana-click-create-api-key.png | ||
| :alt: click create api key | ||
| :screenshot: | ||
| ::: | ||
| To reach the cluster from outside, expose the service and use its external address. Refer to [Access the endpoint](/deploy-manage/deploy/cloud-on-k8s/accessing-services.md#k8s-request-elasticsearch-endpoint) for both cases, including how to retrieve the certificate authority (CA) certificate. | ||
| :::: | ||
|
|
||
| 3. Enter the API key details, and select **Create API key**. | ||
| 4. Copy and securely store the API key, because it only appears once. | ||
| ::::: | ||
|
|
||
| ### Find your Cloud ID [find-cloud-id-cloud-self-managed] | ||
|
|
||
| ## Serverless deployments [_serverless_deployments] | ||
| ```{applies_to} | ||
| deployment: | ||
| ech: ga | ||
| ece: ga | ||
| serverless: ga | ||
| ``` | ||
|
|
||
| ### Find your Elasticsearch endpoint [find-cloud-id-serverless] | ||
| {{beats}} and {{ls}} can use a Cloud ID instead of the endpoint URL. All other clients and tools use the endpoint. | ||
|
charlotte-hoblik marked this conversation as resolved.
Outdated
|
||
|
|
||
| 1. Select the Help icon in the top right corner and then select **Connection Details**. | ||
| 2. Copy the **Elasticsearch endpoint** from the **Endpoints** tab. | ||
| 1. Open {{kib}} for your deployment or project. | ||
| 2. From the **Help menu** {icon}`question`, select **Connection details**. | ||
| 3. Turn on **Show Cloud ID**, then copy the value. | ||
|
|
||
| :::{image} /solutions/images/kibana-serverless-connection-details.png | ||
| :alt: serverless connection details | ||
| :screenshot: | ||
| ::: | ||
| :::{tip} | ||
| :applies_to: {ech: ga} | ||
| To skip {{kib}}, select **Manage** in the {{ecloud}} console and copy the **Cloud ID** from the deployment page. | ||
| ::: | ||
|
|
||
| ::::{note} | ||
| The **Cloud ID** is also available in the **Connection Details** section. Toggle the **Show Cloud ID** option to view it. | ||
| ## Create an API key [create-an-api-key-cloud-self-managed] | ||
|
|
||
| :::: | ||
| :::::{applies-switch} | ||
|
|
||
| ::::{applies-item} { "deployment": { "ech": "ga", "ece": "ga" }, "serverless": "ga" } | ||
|
|
||
| ### Create an API key [create-an-api-key-serverless] | ||
| 1. Open {{kib}} for your deployment or project. | ||
| 2. From the **Help menu** {icon}`question`, select **Connection details**. | ||
| 3. Select the **API key** tab. | ||
| 4. In the **API key name** field, enter a name, then select **Create API key**. | ||
| 5. Select an **API key format**: **Encoded** for {{es}} REST API requests, or **Beats** or **Logstash** to configure those products. | ||
| 6. Copy the key. It isn't available after you close the panel. | ||
|
|
||
| 1. Go to the serverless project’s home page. | ||
| Keys created here expire in 90 days and carry your own privileges. To set an expiration or restrict privileges, select **Manage API keys** and create the key there instead. | ||
| :::: | ||
|
|
||
| ::::{applies-item} {"deployment": {"eck": "ga", "self": "ga"}} | ||
| 1. Go to the **API keys** management page, using the [global search field](/explore-analyze/find-and-organize/find-apps-and-objects.md) to find it. | ||
| 2. Select **Create API key**. | ||
| 3. Enter a name, then select **Create API key**. | ||
| 4. Copy the key. It isn't available after you leave the page. | ||
|
|
||
| :::{image} /solutions/images/kibana-serverless-create-an-api-key.png | ||
| :alt: serverless create an api key | ||
| :screenshot: | ||
| ::: | ||
| Keys created here don't expire unless you add an expiration date. | ||
| :::: | ||
|
|
||
| 4. Enter the API key details, and select **Create API key**. | ||
| 5. Copy and securely store the API key, because it only appears once. | ||
| ::::: | ||
|
|
||
| ### Test connection [elasticsearch-get-started-test-connection] | ||
| For key types, privileges, and expiration options, refer to [](/deploy-manage/api-keys.md). | ||
|
|
||
| Use [`curl`](https://curl.se) to verify your connection to {{es}}. | ||
| ## Test your connection [elasticsearch-get-started-test-connection] | ||
|
|
||
| In a terminal, assign the {{es}} endpoint and `encoded` API key to the `ES_URL` and `API_KEY` environment variables respectively. `curl` needs access to these values. | ||
| Verify your endpoint and API key with a request to the {{es}} root endpoint. | ||
|
|
||
| For example: | ||
| 1. In a terminal, assign your endpoint and encoded API key to environment variables: | ||
|
|
||
| ```bash | ||
| export ES_URL="https://dda7de7f1d264286a8fc9741c7741690.es.us-east-1.aws.elastic.cloud:443" | ||
| export API_KEY="ZFZRbF9Jb0JDMEoxaVhoR2pSa3Q6dExwdmJSaldRTHFXWEp4TFFlR19Hdw==" | ||
| ``` | ||
| ```bash | ||
| export ES_URL="https://a1b2c3d4e5f6.us-central1.gcp.cloud.es.io:443" | ||
| export API_KEY="ZFZRbF9Jb0JDMEoxaVhoR2pSa3Q6dExwdmJSaldRTHFXWEp4TFFlR19Hdw==" | ||
| ``` | ||
|
|
||
| Next, run the following command to test your connection: | ||
| 2. Send the request: | ||
|
|
||
| ```bash | ||
| curl "${ES_URL}" \ | ||
| -H "Authorization: ApiKey ${API_KEY}" \ | ||
| -H "Content-Type: application/json" | ||
| ``` | ||
| ```bash | ||
| curl "${ES_URL}" -H "Authorization: ApiKey ${API_KEY}" | ||
| ``` | ||
|
|
||
| You should receive a response similar to the following: | ||
| A successful response returns your cluster details: | ||
|
|
||
| ```json | ||
| { | ||
| "name" : "serverless", | ||
| "cluster_name" : "dda7de7f1d264286a8fc9741c7741690", | ||
| "name" : "instance-0000000000", | ||
| "cluster_name" : "my-deployment", | ||
| "cluster_uuid" : "ws0IbTBUQfigmYAVMztkZQ", | ||
| "version" : { ... }, | ||
| "tagline" : "You Know, for Search" | ||
| } | ||
| ``` | ||
|
|
||
| Now you’re ready to start adding data to your {{es-serverless}} project. | ||
| :::{note} | ||
| :applies_to: {eck: ga, self: ga} | ||
| If your cluster uses a self-signed certificate, pass your CA certificate with `curl --cacert`. Refer to [Automatic security setup](/deploy-manage/security/self-auto-setup.md) for the certificate location. | ||
| ::: | ||
|
|
||
| ## Next steps | ||
|
|
||
| * [Connect a client library](/reference/elasticsearch-clients/index.md) in your language of choice. | ||
| * [Ingest data](/solutions/search/ingest-for-search.md) into your cluster or project. | ||
| * [Build search queries](/solutions/search/querying-for-search.md) against your data. | ||
|
|
||
| ## Related pages | ||
|
|
||
| * [Configure Beats and {{ls}} with a Cloud ID](/deploy-manage/deploy/elastic-cloud/find-cloud-id.md) | ||
| * [Connect to {{es}} on {{ece}}](/deploy-manage/deploy/cloud-enterprise/connect-elasticsearch.md) | ||
| * [Securing HTTP client applications](/deploy-manage/security/httprest-clients-security.md) | ||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.