Page tree
Skip to end of metadata
Go to start of metadata

Cloud Native PNDA development guide on AWS EKS:

This document describes how you can setup Cloud Native PNDA on AWS


  • AWS account
  • Windows OS / Oracle VM Virtual Box Manager with latest Ubuntu OS based VM
  • VM needs to have following installed
    1. AWS Cli
    2. Docker
    3. Kubernetes (kubectl)
    4. Eksctl
    5. Helm Client

AWS CLI Installation and Setup:

Use following link for AWS CLI setup

Once setup is done then configure aws cli as per below,

      $ aws configure

      AWS Access Key ID [None]: Enter your access key ID

      AWS Secret Access Key [None]: Enter your secret access key

      Default region name [None]: Enter your region

      Default output format [None]: json

Docker Installation:

Follow the steps as mentioned in an official documentation to install Docker,

Kubernetes(kubectl) Installation:

In your terminal run the following commands:

EKSCTL Installation:

Run the following commands in your terminal

 Helm client 2.14 Installation:

$curl -L | bash -s -- --version v2.14.3

$helm version


Step 1) Create EKS cluster on AWS:

You can create EKS cluster on AWS by using either CLI or AWS GUI

 Creating EKS cluster through CLI by step a or b:

  1. EKS cluster creation command from cli:

sudo eksctl create cluster --name pnda \

 --region us-east-2 \

--version 1.14 \

--nodegroup-name pnda-nodes \

--node-type t3.xlarge \

--nodes 5 \

--nodes-min 2 \

--nodes-max 6 \


2. Using Config files: create pnda_eks_cluster.yaml file


kind: ClusterConfig


  name: pnda

  region: es-east-1


  - name: ng-pnda-1

    instanceType: t3.large

    desiredCapacity: 10

    volumeSize: 80


      allow: true # will use ~/.ssh/ as the default ssh key

  - name: ng-pnda-2

    instanceType: t3.xlarge

    desiredCapacity: 2

    volumeSize: 100


      publicKeyPath: ~/.ssh/

$ eksctl create cluster -f pnda_eks_cluster.yaml

Note: If you needed to use an existing VPC, you can use config file with VPC details,




        eu-north-1a: { id: subnet-0ff156e0c4a6d300c }                              

        eu-north-1b: { id: subnet-0549cdab573695c03 }                             

        eu-north-1c: { id: subnet-0426fb4a607393184 }

Creating EKS cluster thru GUI:

Follow the steps as mentioned in following link,

Note: Creating EKS cluster thru GUI is time taking and harder as compared to using CLI.

Step 2) Setup alb Load balancer for created cluster.


Run the following commands to setup load balancer,

IAM Console --> Roles --> search for the NodeInstanceRole.

(Example: eksctl-pnda-eks-NodeInstanceRole-xxxxxx.) --> Attach policy select ingressController-iam-policy.

kubectl edit deployment.apps/alb-ingress-controller -n kube-system



      - args:

        - --ingress-class=alb 




  • kubectl apply -f alb-ingress-controller.yaml
  • kubectl get pods -n kube-system à This should return running alb ingress controller pod.

 Step 3) Helm tiller Installation on EKS cluster:

$helm init

Create rbac-config.yaml

apiVersion: v1

kind: ServiceAccount


  name: tiller

  namespace: kube-system



kind: ClusterRoleBinding


  name: tiller



  kind: ClusterRole

  name: cluster-admin


  - kind: ServiceAccount

    name: tiller

    namespace: kube-system

$kubectl create -f rbac-config.yaml

$helm init --service-account tiller --upgrade

$helm version

Note: Default EBS General Purpose SSD(gp2) volume types only supports read-write-once persistent volume (PV) access-mode. The PV which we create for Deployment Manager requires read-write-many access-mode, as multiple pods (Deployment Manager, Spark Operatoretc..) share same PV. Hence, we have to create/setup EFS CSI driver which supports read-write-many access-mode for a PV.

Step 4) To deploy Amazon EFS CSI driver to an Amazon EKS cluster

  1.   kubectl apply -k ""
  2. aws eks describe-cluster --name pnda --query "cluster.resourcesVpcConfig.vpcId" --output text 
    1. (Above command will return VPC ID and use the same in below command)
  3. aws ec2 describe-vpcs --vpc-ids vpc-exampledb76d3e813 --query "Vpcs[].CidrBlock" --output text (Above command returns VPC CODR range and use the same while adding rule for NFS inbound traffic)
    1. Create a security group that allows inbound NFS traffic for your Amazon EFS mount points.
    2. Open the Amazon VPC console at
    3. Choose Security Groups in the left navigation pane, and then Create security group.
    4. Enter a name and description for your security group, and choose the VPC that your Amazon EKS cluster is using.
    5. Choose Create and then Close to finish.
  4. Add a rule to your security group to allow inbound NFS traffic from your VPC CIDR range.
    1. Choose the security group that you created in the previous step.
    2. Choose the Inbound Rules tab and then choose Edit rules.
    3. Choose Add Rule, fill out the following fields, and then choose Save rules.
      1. Type: NFS
      2. Source: Custom. Paste the VPC CIDR range.
      3. Description: Add a description, such as "Allows inbound NFS traffic from within the VPC."

Step 5) Create AWS EFS


 Note: Use same region as EKS cluster created region in above URL

There are 2 ways to create AWS elastic file system

  1. Using GUI:
    1. Open the Amazon Elastic File System console at .
    2. Choose File systems in the left navigation pane, and then choose Create file system.
    3. On the Create file system page, choose Customize.
    4. On the File system settings page, you don't need to enter or select any information, but can if desired, and then select Next.
    5. On the Network access page, for Virtual Private Cloud (VPC), choose your VPC.Note: If you don't see your VPC, at the top right of the console, make sure that the region that your VPC is in is selected.
    6. Under Mount targets, if a default security group is already listed, select the X in the top right corner of the box with the default security group name to remove it from each mount point, select the security group that you created in a previous step for each mount target, and then select Next.
    7. On the File system policy page, select Next.
    8. On the Review and create page, select Create.


2. Using CLI:

    Follow the steps from following link,

 Step 6) Setup K8S-EFS provisioner

  1. Download k8s-efs repository from git,
    1. git clone
  2. Switch to the deploy directory
    1. cd external-storage/aws/efs/deploy/
  3. Apply rbac permissions
    1. Kubectl apply -f rbac.yaml
  4. Modify manifest.yaml. In the configmap section change the and aws.region: to match the details of the EFS you created. Change if you want to mount by your own DNS name and not by AWS's *file-system-id*.efs.*aws-region* See following attachment for manifest.yaml,


5. Apply the manifest

kubectl apply -f manifest.yaml

6. Check PV and PVC created properly

kubectl get pv, pvc  (should return efs volume with aws-efs storage class)

Step 7) Setup Console/Kafka/Grafana/etc.. service types as load balancer for Helm charts

 Console: ~/pnda/pnda-helm-chart/cloud-pnda/values.yaml


                Kafka: ~/pnda/pnda-helm-chart/cloud-pnda/charts/kafka-manager


               Grafana: ~/pnda/pnda-helm-chart/cloud-pnda/charts/grafana/values.yaml


Step 8) Add storage class as gp2 for all other pvc and aws-efs for deployment manager pvc.

                storageClass: aws-efs

                storageClass: gp2

Step 9) Install PNDA on eks with helm

(helm install --name pnda --namespace pnda cloud-pnda)

Step 10) Setup DNS alias for external IP’s in Route 53 to access the DNS like within private network

Step 11) Access the console front end from any one of the ec2 instance.

                PNDA UI:

Step 12) Testing the deployment of SparkStreaming

  1.  To test the deployment of SparkStreaming we have created an example app literary-word-count-app-wf-0.3.2.tar.gz.
  2.  To upload the package to the cloud-pnda platform: 
    1. kubectl -n pnda port-forward service/pnda-package-repository 8888
  3. It is possible to temporarily expose the package repository API with kubectl port forwarding:
    1. curl -XPUT "http://localhost:8888/packages/literary-word-count-app-     wf-0.3.2.tar.gz?" --data-binary "@literary-word-count-app- wf-0.3.2.tar.gz"
  4. You can see the uploaded package details under available packages in Package Management and then deploy the package by clicking Deploy button.


5. After successfully deploying the package, create/install the application in the Apps Tab



6. Verify the application on K8S cluster(Tested on Rancher cluster).



7. To delete the application, you have to click on delete button of particular application under Apps Tab,


Sample Spark Streaming example is in following Git repo,

Step 13) Clean-up

 Delete PNDA on eks cluster

% helm del –purge pnda

Delete EKS Cluster:

% eksctl delete cluster --region=us-east-2 --name=pnda

  • No labels