MATIH Platform is in active MVP development. Documentation reflects current implementation status.
17. Kubernetes & Helm
Cluster Setup
AWS EKS

Amazon Elastic Kubernetes Service (EKS)

Amazon EKS is a fully supported deployment target for MATIH. The cluster uses VPC CNI for pod networking, IAM Roles for Service Accounts (IRSA) for pod-level AWS access, and integration with AWS Secrets Manager for secret management.


Cluster Configuration

EKS clusters are provisioned through the Terraform module at infrastructure/terraform/modules/aws/eks/:

module "eks" {
  source  = "terraform-aws-modules/eks/aws"
  version = "~> 20.0"
 
  cluster_name    = "matih-${var.environment}"
  cluster_version = "1.29"
  vpc_id          = var.vpc_id
  subnet_ids      = var.private_subnet_ids
 
  cluster_endpoint_public_access  = true
  cluster_endpoint_private_access = true
 
  enable_irsa = true
 
  cluster_addons = {
    coredns    = { most_recent = true }
    kube-proxy = { most_recent = true }
    vpc-cni    = { most_recent = true }
    aws-ebs-csi-driver = { most_recent = true }
  }
}

Managed Node Groups

EKS uses managed node groups with instance type selection per workload:

Node GroupInstance TypeMin/MaxPurposeTaint
systemm5.xlarge3/3System componentsNone
ctrlplanem5.xlarge2/5Control plane servicesmatih.ai/control-plane=true:NoSchedule
dataplanem5.2xlarge2/10Data plane servicesmatih.ai/data-plane=true:NoSchedule
computer5.4xlarge2/10Trino, Spark workersmatih.ai/compute=true:NoSchedule
aicomputem5.2xlarge1/8AI/ML workloadsmatih.ai/ai-compute=true:NoSchedule
gpup3.2xlarge0/4GPU inferencenvidia.com/gpu=true:NoSchedule

IAM Roles for Service Accounts (IRSA)

IRSA enables pods to assume IAM roles via annotated service accounts:

apiVersion: v1
kind: ServiceAccount
metadata:
  name: external-secrets
  namespace: external-secrets
  annotations:
    eks.amazonaws.com/role-arn: "arn:aws:iam::123456789:role/matih-external-secrets"

The following services use IRSA:

ServiceIAM RolePurpose
external-secretsmatih-external-secretsAWS Secrets Manager access
cert-managermatih-cert-managerRoute53 DNS validation
ai-servicematih-ai-bedrockAWS Bedrock LLM inference
data-plane-agentmatih-s3-accessS3 data lake access

VPC CNI Configuration

EKS uses the Amazon VPC CNI plugin with the following settings:

SettingValue
Network pluginamazon-vpc-cni
Pod networkingNative VPC IP allocation
Network policyCalico (add-on)
Service CIDR172.20.0.0/16
Max pods per nodeInstance-dependent

Storage Classes

EKS provides EBS-backed storage classes via the CSI driver:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: gp3
provisioner: ebs.csi.aws.com
parameters:
  type: gp3
  fsType: ext4
  iops: "3000"
  throughput: "125"
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
Storage ClassEBS TypeUse Case
gp3General Purpose SSDDefault for most workloads
io2Provisioned IOPS SSDPostgreSQL, ClickHouse
st1Throughput Optimized HDDKafka log segments, archival

ECR Integration

For EKS deployments, images are stored in Amazon Elastic Container Registry (ECR):

global:
  imageRegistry: 123456789.dkr.ecr.us-west-2.amazonaws.com/matih
  imagePullSecrets:
    - name: ecr-secret

The kubelet automatically refreshes ECR credentials via the ecr-credential-helper.