How to configure an AWS EKS Cluster for the vFunction Server



Overview

The vFunction Server can be deployed to an AWS EKS Cluster. The Cluster can be configured to use distinct AWS Instance Types for different Pods that have unique resource requirements. This document is intended to illustrate how to use multiple Node Groups with unique Instance Types.


Cluster Configuration Documentation

The vFunction Server includes Pods that have lower- and higher-memory requirements. A full list of Pods and their Deployment configurations can be found in the, for example, Kubernetes Helm Architectural Overview documentation.

Two Node Groups can be created, as in this example below, to associate specific Nodes to specific Instance Types:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: vfunction-k8s-server
  region: region-code
  # https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/place-kubernetes-pods-on-amazon-eks-by-using-node-affinity-taints-and-tolerations.html

nodeGroups:
  - name: ng_high_ram
    # 4 CPU, 8GB RAM
    # VF Deployments: dm, measurements, otlp 
    instanceType: c7a.xlarge
    minSize: 1
    maxSize: 30
  - name: ng_low_ram
    # 2 CPU, 4GB RAM
    # VF Deployments: mysql, nginx, storage, idp, mcp, organizations, parser, users
    instanceType: c7a.large
    minSize: 2
    maxSize: 3

vFunction Server’s Installation.yaml

After the Cluster has been configured with, for example, two NodeGroups with two Instance Types, the vFunction Installation.yaml can be modified to point the correct Nodes to the desired Node Groups.

Access the vFunction Server’s Installation.yaml and set the Node Selectors for the appropriate vFunction Services:

  1. Download the vFunction Kubernetes Installation TGZ
  2. SCP the Kubernetes Installation TGZ package to the Linux VM with kubectl access to the Kubernetes Cluster
  3. Unpack the Installation Package
### Replace VERSION with the actual value
tar -xvzf vfunction-server-installation-kubernetes.vVERSION.tgz
  1. Open the installation.yaml and create Node Selector entries
### Replace VERSION with the actual value
vi vfunction-server-for-kubernetes/config/installation.yaml
### Before
server:
...
  affinity:
    node_selectors:

### After
server:
...
  affinity:
    node_selectors:
      - key: "alpha.eksctl.io/nodegroup-name"
        value: "ng_high_ram"
        services: "vfapi-measurements, vfapi-otlp, vfapi-dm"
      - key: "alpha.eksctl.io/nodegroup-name"
        value: "ng_low_ram"
        services: "mysql, nginx, storage, vfapi-parser, vfapi-users, vfapi-organizations, vfapi-idp, vfapi-mcp"