Deploying Denodo in EKS Fargate with Helm Charts

You can translate the document:

Overview

Amazon EKS with Fargate allows you to run Kubernetes pods without managing EC2 instances. When deploying containers using this service, AWS provisions and scales the infrastructure for each pod, providing strong isolation and a pay-per-use billing model.

List of Prerequisites

This article assumes that there is an environment already configured with the tools required to deploy Helm Chart for container images of Denodo in AWS, in other cases, it might be needed to install or configure something else before continuing with the next section. In summary, you need:

  • A valid AWS account with enough privileges to build all the AWS elements involved in the deployment of the Denodo image.
  • AWS CLI: Installed and configured with appropriate permissions.
  • eksctl: The official CLI tool for EKS.
  • kubectl: The Kubernetes command-line tool.
  • Helm 3.x: For deploying Denodo using official charts. The Helm CLI can be installed using either its source code or a pre-built binary release. Refer to the Official Helm Documentation for detailed installation instructions.
  • A locally accessible Docker image of Denodo. You can use the images provided by Denodo in the Denodo Container Registry. For example you can push a copied image from Denodo Container Registry to your Amazon ECR Repository.

Configure the AWS CLI

To start with the AWS configuration, open a new console and execute the below AWS commands that will do the basic configuration of the AWS CLI.

Configure the AWS access keys for the AWS account by using the following command:

$ aws configure

When entering this command, the AWS CLI prompts for the following information:

  • AWS Access Key ID
  • AWS Secret Access Key
  • Default region name
  • Default output format

To read more about the AWS CLI configuration check the AWS CLI user guide.

At this point, you need to decide if you will configure the default AWS CLI profile or if you want to create a custom profile. If you create a custom profile some of the commands in the rest of the guide will require an additional parameter to specify the profile to use (--profile profilename) so for simplicity, we will just configure the default profile in this guide. You can read more about named profiles in the  AWS Command Line Interface documentation.

Use these commands to configure the IAM role in the default profile:

$ aws configure set role_arn <roleARN>

$ aws configure set source_profile default

The role_arn parameter specifies the Amazon Resource Name (ARN) of an IAM role that you want to use to perform operations with the default profile. It will have this format: arn:aws:iam::<accountNumber>:role/<roleName>

The source_profile parameter identifies what profile to use to find credentials that have permission to assume the IAM role.

Create the Container Registry

Create a new Elastic Container Registry by providing a custom name for the repository:

$ aws ecr create-repository --repository-name <denodo-ecr>

Check that the denodo-ecr repository has been created successfully and obtain its repositoryUri from the output of the create-repository statement. The field repositoryUri will be used later to authenticate the local Docker client.

To obtain the repositoryUri value the following command can be used:

$ aws ecr describe-repositories --repository-name <denodo-ecr> --query "repositories[].repositoryUri"

Authenticate the Docker client to the new registry to push the Denodo image to the repository using the repositoryUri:

$ aws ecr get-login-password | docker login --username AWS --password-stdin <repositoryUri>

Finally, tag the Denodo image and push it to the Elastic Container Registry

$ docker tag denodo-platform:latest <repositoryUri>

$ docker push <repositoryUri>

$ aws ecr list-images --repository-name <denodo-ecr>

Create the EKS Cluster Fargate

You must create an EKS cluster and define which pods should run on Fargate using a Fargate Profile. This profile selects pods based on their namespace and labels.

Create the cluster and default profile using eksctl:

$ eksctl create cluster \

  --name denodo-eks-cluster \

  --region us-east-1 \

  --fargate

Note: This command creates a default Fargate profile for the default and kube-system namespaces.

Check cluster add-ons

You can use the UI AWS console to check the AWS add-ons installed over the EKS cluster, and update them if is necessary:

  • CoreDNS
  • kube-proxy
  • Amazon VPC CNI
  • Amazon EKS Pod Identity Agent

AWS Load Balancer Controller installation

The AWS Load Balancer controller (LBC) provisions AWS Network Load Balancer (NLB) and Application Load Balancer (ALB) resources. The LBC watches for new service or ingress Kubernetes resources and configures AWS resources.

Check the latest installation steps of AWS Load Balancer Controller 

Summary

Create an IAM OIDC provider. You can skip this step if you already have one for your cluster.

$ eksctl utils associate-iam-oidc-provider \

    --region <region-code> \

    --cluster <your-cluster-name> \

    --approve

Download an IAM policy for the LBC using one of the following commands:

If your cluster is in a US Gov Cloud region:

$ curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.17.0/docs/install/iam_policy_us-gov.json

If your cluster is in a China region:

$ curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.17.0/docs/install/iam_policy_cn.json

If your cluster is in any other region:

$ curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.17.0/docs/install/iam_policy.json

Create an IAM policy named AWSLoadBalancerControllerIAMPolicy.

$ aws iam create-policy \

    --policy-name AWSLoadBalancerControllerIAMPolicy \

    --policy-document file://iam-policy.json

Create an IAM role and Kubernetes ServiceAccount for the LBC. Use the ARN from the previous step.

$ eksctl create iamserviceaccount \

--cluster=<cluster-name> \

--namespace=kube-system \

--name=aws-load-balancer-controller \

--attach-policy-arn=arn:aws:iam::<AWS_ACCOUNT_ID>:policy/AWSLoadBalancerControllerIAMPolicy \

--override-existing-serviceaccounts \

--region <region-code> \

--approve

Add the EKS chart repo to Helm

$ helm repo add eks https://aws.github.io/eks-charts

$ helm repo update eks

Install controller by Helm

$ helm install aws-load-balancer-controller eks/aws-load-balancer-controller \

-n kube-system \

--set clusterName=<cluster-name> \

--set serviceAccount.create=false \

--set serviceAccount.name=aws-load-balancer-controller

Verify that the controller installed correctly, run the following command:

$ kubectl get deployment -n kube-system aws-load-balancer-controller

Configure Kubeconfig for an existing cluster

If the EKS cluster is not created from your local terminal, you can configure kubectl to point it running the following command:

$ aws eks update-kubeconfig \

  --name denodo-eks-cluster \

  --region us-east-1 \

  --fargate

Deploy Denodo using Helm

You can follow the Helm Charts Quick Start Guide to deploy Denodo on EKS with Fargate.

Considerations for EKS Fargate

ulimit Management (Nofile and Nproc)

Fargate sets a soft limit of 1024 for nofile and nproc by default, which may be insufficient for high-concurrency Virtual Data Port (VDP) workloads. Solution is create a preinit script which modifies the limits in the bash configuration file, for example in values.yaml:

 preInit:

    scripts:

      modify-limits.sh: |

        #!/bin/bash

        # Modify open files limit

        ulimit -Su 65000

        ulimit -Sn 65000

        echo "ulimit -Sn 65000" >> /opt/denodo/tools/container/bash-env.sh

        echo "ulimit -Su 65000" >> /opt/denodo/tools/container/bash-env.sh

…

 extraEnvVars:

    - name: BASH_ENV

      value: "/opt/denodo/tools/container/bash-env.sh"

Furthermore, because this ulimit configuration applies only for the main process, health check probes cannot use exec commands. Instead of that use HTTP request to the webcontainer for example creating a ping query view:

 readinessProbe:

    httpGet:

      path: /server/admin/ping_query_view/views/ping_query_view?%24format=json

      port: 9443

      scheme: HTTPS

 livenessProbe:

    httpGet:

      path: /denodo-restfulws/Ping

      port: 9443

      scheme: HTTPS

Starting with version 9.4.0, the Denodo RestfulWS ping URL can also be utilized for the readinessProbe with the status parameter:

 readinessProbe:

    httpGet:

      path: /denodo-restfulws/Ping?status=ready

      port: 9443

      scheme: HTTPS

Storage and Persistence

External Metadata (Mandatory)

Configure Denodo to use an external database (RDS PostgreSQL, Aurora, Oracle, …) to store the metadata of Denodo Platform and Solution Manager products.
For this reason you must configure the database in the
values.yaml:

  database:

    enabled: true

    …

Local persistence (Not supported)

Fargate profiles do not support persistent EBS (Elastic Block Store) volumes. We cannot mount an EBS disk to save logs, local configurations, metadata. An Amazon EFS (Elastic File System) would be configured for file persistence, but the recommended is External Metadata, redirect logs to stdout, and mount initial configurations from ConfigMaps or Secrets.

For this reason you must disabled persistence in values.yaml:

  persistence:

    enabled: false

Service access

JDBC and ODBC

For JDBC traffic (port 9999) and ODBC traffic (port 9996): Use NLB (Network Load Balancer). This is necessary for maintaining persistent, high-performance TCP connections. Improve balance with stickiness.enabled=false. See: AWS Load Balancer Controller NLB Guide

NLB Sample Configuration:

## @param extraDeploy Array of extra objects to deploy with the release (evaluated as a template)

##

extraDeploy:

  - |

    {{- if .Values.nlb.enabled }}

    apiVersion: v1

    kind: Service

    metadata:

      name: {{ include "denodo.fullname" . }}-nlb

      namespace: {{ .Release.Namespace | quote }}

      labels:

        {{- include "denodo.labels" . | nindent 4 }}

      {{- if .Values.nlb.annotations }}

      annotations:

        {{- if or .Values.nlb.annotations }}

        {{- include "common.tplvalues.render" ( dict "value" .Values.nlb.annotations "context" $ ) | nindent 4 }}

        {{- end }}

      {{- end }}

    spec:

      type: LoadBalancer

      ports:

        - name: tcp9999

          port: 9999

          targetPort: 9999

          protocol: TCP

        - name: tcp9996

          port: 9996

          targetPort: 9996

          protocol: TCP

      selector:

        {{- include "denodo.selectorLabels" . | nindent 4 }}

    {{- end }}

nlb:

  enabled: true

  ## @param nlb.annotations Provide any additional annotations that may be required

  annotations:

    service.beta.kubernetes.io/aws-load-balancer-name: "eks-elb-nlb"

    service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"

    service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"

    service.beta.kubernetes.io/aws-load-balancer-attributes: "deletion_protection.enabled=true,load_balancing.cross_zone.enabled=true,dns_record.client_routing_policy=availability_zone_affinity"

    service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: "stickiness.enabled=false,stickiness.type=source_ip"

Web/API Traffic

For Web/API traffic (WS, Design Studio, Data Catalog): ALB (Application Load Balancer) with the Ingress Controller is recommended. See AWS Load Balancer Controller Ingress Guide 

Ingress Sample Configuration:

This configuration includes Sticky Sessions (Session Affinity) via cookies, which is often required for web-based tools.

ingress:

  enabled: true

  className: "alb"

  annotations:

    # Enable Sticky Sessions for Web UI consistency

    alb.ingress.kubernetes.io/target-group-attributes: "stickiness.enabled=true,stickiness.type=lb_cookie"

    alb.ingress.kubernetes.io/load-balancer-attributes: "deletion_protection.enabled=false,load_balancing.cross_zone.enabled=true,idle_timeout.timeout_seconds=1800"

    alb.ingress.kubernetes.io/scheme: internet-facing

    # Essential for Fargate

    alb.ingress.kubernetes.io/target-type: ip

   hosts:

    - host:

      paths:

        - path: /denodo-restfulws/

          pathType: Prefix

          serviceName: denodo-platform-service

        - path: /server

          pathType: Prefix

          serviceName: denodo-platform-service

        - path: /denodo-design-studio

          pathType: Prefix

          serviceName: designstudio-service

Important Note on Annotations: When using the AWS Load Balancer Controller, ensure you specify the target type as IP, since instance mode does not work in Fargate:

  • For NLB Service: service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"

  • For Ingress: alb.ingress.kubernetes.io/target-type: "ip"

References

Helm Charts Quick Start Guide 

Denodo Docker Container Configuration

AWS Command Line Interface
AWS Load Balancer Controller

How to create your own Docker images for Denodo Platform Containers

Disclaimer

The information provided in the Denodo Knowledge Base is intended to assist our users in advanced uses of Denodo. Please note that the results from the application of processes and configurations detailed in these documents may vary depending on your specific environment. Use them at your own discretion.

For an official guide of supported features, please refer to the User Manuals. For questions on critical systems or complex environments we recommend you to contact your Denodo Customer Success Manager.
Recommendation

Recommended resources Recommendations generated by AI

Deploying Denodo in Amazon Elastic Kubernetes Service (EKS)

Deploying Denodo in Amazon Elastic Container Service (ECS) using Fargate

Deploying Denodo on OpenShift

Deploying Denodo in Google Kubernetes Engine (GKE)

Accelerate Your Denodo Journey with Helm Charts

Questions

Ask a question

You must sign in to ask a question. If you do not have an account, you can register here