DZone
Cloud Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Cloud Zone > Connect External OpenSearch Dashboard to AWS OpenSearch Domain With Helm

Connect External OpenSearch Dashboard to AWS OpenSearch Domain With Helm

In this article, learn the steps needed to connect the external OpenSearch Dashboard to the AWS OpenSearch domain with Helm.

Miguel Angel Chuecos Piera user avatar by
Miguel Angel Chuecos Piera
CORE ·
Feb. 06, 22 · Cloud Zone · Tutorial
Like (2)
Save
Tweet
3.12K Views

Join the DZone community and get the full member experience.

Join For Free

Last year, AWS announced the renaming of Amazon Elasticsearch Service to Amazon OpenSearch Service, with OpenSearch being the successor to the distributed search and analytics cluster service.

Why Did Amazon Change From Elasticsearch to OpenSearch?

On January 21, 2021, Elastic NV announced that they would change their software licensing strategy and not release new versions of Elasticsearch and Kibana under the permissive ALv2 license. Instead, Elastic is releasing Elasticsearch and Kibana under the Elastic license, with source code available under the Elastic License or Server Side Public License (SSPL). These licenses are not open source. Because of this, Amazon decided to create and maintain a fork from the last ALv2 version of Elasticsearch and Kibana. The fork is called OpenSearch and is available under ALv2.

The updated policy is available in the official documentation.

How It Works

When you create an OpenSearch domain, you are creating a cluster. This cluster is composed of several EC2 instances, which are equivalent to a node. Each node stores data and processes query requests.

For productive environments, there are master nodes that manage the operations of the nodes. They manage the status, health of each node, and shards distribution.

However, you won't see any EC2 instances in the EC2 service. This is because OpenSearch Service is a managed service (SaaS) by AWS. For that reason, you will only be able to edit the cluster configuration (number of nodes, instance types, etc.).

Connect External OpenSearch Dashboard to AWS OpenSearch Domain With Helm

OpenSearch DashboardRequirements

Your Environment:

  • Git
  • Visual Studio Code or another similar code editor tool
  • kubectl and the kubeconfig of the EKS cluster configured. You can check out more about it in the Kubernetes documentation.
  • Helm

Your AWS Account:

  • Create an OpenSearch domain
  • HTTPS connection enabled between the SGs of the OpenSearch domain and the EKS nodes of the different VPCs

Steps

  1. First, clone the OpenSearch Helm chart repository. 
  2. Open the project with Visual Studio Code and go to the helm-charts/charts/opensearch-dashboards/ directory to edit the values.yaml file.
  3. Before going into the details of the helm chart configuration, it is important to create a secret in the namespace where OpenSearch Dashboard will be deployed which will contain the user and password to access the portal.
kubectl create secret generic opensearchdashboards-auth --from-literal=username="myfirstuser" --from-literal=password="myfirstpasswd" [OPTIONAL: -n opensearch]

4.  Open the file values.yaml and apply the following configuration:

Sets the domain endpoint of the Amazon OpenSearch service as the value for the opensearchHosts parameter. You can get it from the General Information panel:

General Information Panel

YAML
 
opensearchHosts: "https://vpc-dump-domain-xvu6q2qt7vjs2ueaipnotcpyui.eu-north-1.es.amazonaws.com/_dashboards"

5.  Then set the name and the version of the OpenSearch Dashboards docker image. The following example uses the official image obtained from Docker Hub but you can use one from a private repository (ECR, Artifactory, NexusOSS...).

YAML
 
image: "opensearchproject/opensearch-dashboards"
imageTag: "1.2.0"
imagePullPolicy: "IfNotPresent"

6.  Define the name of the secret which contains the username/password credentials created in the previous steps to link it to the dashboard:

YAML
 
opensearchAccount:
  secret: "opensearchdashboards-opensearch-auth"
  keyPassphrase:
    enabled: false

7.  Finally, as an optional step, you can configure your ingress to enable external service to the pod. In the following example, Traefik has been used as a reverse proxy and balancer in the cluster.

YAML
 
ingress:
  enabled: true
  annotations:
    external-dns.alpha.kubernetes.io/target: traefik-int.cloud.myprivatedomain.com
    kubernetes.io/ingress.class: traefik
  hosts:
    - host: opensearchdashboard.cloud.myprivatedomain.com
      paths:
        - path: /

In case you don't want to configure this part, you can enable access from your local environment using the command. After running the following command, you will be able to check the dashboard access from localhost:8080 (Must be deployed first).

Shell
 
kubectl port-forward -n opensearch [OS_DASHBOARD_POD_NAME] 8080:5601

Once the helm chart has been configured with the correct values, it is time to open a terminal at the same level as the values.yaml file and execute helm install to deploy the OpenSearch Dashboard chart in your EKS cluster.

Shell
 
helm install opensearchdashboards . -n opensearch [OPTIONAL: --create-namespace]

After a few seconds, you will see that it has been successfully deployed and you will be able to access the OpenSearch dashboard from the browser:

Login to OpenSearch Dashboard

Now, it will be time to synchronize with the domain indexes and start visualizing and processing the data.

AWS Dashboard (Mac OS) Docker (software)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Python 101: Equality vs. Identity
  • Version Number Anti-Patterns
  • Artificial Intelligence (AI) And Its Assistance in Medical Diagnosis
  • Applying Domain-Driven Design Principles to Microservice Architectures

Comments

Cloud Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo