On-Prem Prerequisites
Below is everything needed before deploying Middleware on premise. The installation guide is shared by the Middleware team during onboarding.
At a glance, you will need:
- From Middleware team — registry username + token, installation guide
- Kubernetes cluster — v1.25+, sized as per the table below, kubeconfig with cluster-admin access
- CLI tools —
helm(v3.8+),kubectl,opensslon the machine running the install - Storage class — one default storage class with dynamic provisioning and volume expansion enabled (
allowVolumeExpansion: true). Volume sizes are set at install from your sizing, provided by the Middleware team - Object storage — S3 bucket with an IAM user access key (access key ID + secret), or a Blob container with its storage account key
- Domain — a domain of your own that users open in the browser and agents send data to (example:
mw.your-company.com). Each account opens on its own subdomain (<account>.mw.your-company.com), so DNS must cover bothmw.your-company.comand*.mw.your-company.com - SSL — certificate and private key files for the same two names (
mw.your-company.comand*.mw.your-company.com) - Network egress — from the cluster nodes to the hosts in Outbound URLs, kept open after the install
- Load balancer — decide whether the Middleware endpoint is public or internal only, before installing
- Credentials — owner email + password, decided before install (datastore passwords are generated by the install kit)
Your credentials stay in your environment. The storage access key and the SSL private key are entered by your team on the machine running the install. They are stored in your values file, your install folder and Kubernetes secrets in your cluster, and are never sent to Middleware.
On EKS, you can also install without either key: S3 access through an IAM role and TLS with an ACM certificate.
Before the setup call, have your security team approve:
- an IAM user with an access key limited to the Middleware bucket (AWS), or the storage account key (Azure)
- the SSL private key on the install machine and in a Kubernetes secret
- outbound access from the cluster nodes to the Outbound URLs
- cluster-admin access for the person running the install
Cluster Sizing#
| Tier | Daily ingest | AWS (EKS) | Azure (AKS) | Total capacity |
|---|---|---|---|---|
| Evaluation | up to 25 GB/day | 3 × m6i.xlarge | 3 × D4s_v5 | 12 vCPU / 48 GB |
| Standard | up to 500 GB/day | 4 × m6i.2xlarge | 4 × D8s_v5 | 32 vCPU / 128 GB |
| High volume | ~1 TB/day | 6 × m6i.2xlarge | 6 × D8s_v5 | 48 vCPU / 192 GB |
- Add one 8-core node per additional 100 GB/day beyond the table.
- No burstable instances (
t2/t3/B-series) in production. - Node root disk: 100 GB per node (50 GB is enough for the evaluation tier).
- Optional: a dedicated database node pool — 1 node, 8 core / 32 GB, taint
dedicated=database:NoSchedule(ClickHouse tolerates it; setclickhouse.clusters.db1.nodeSelectorin the values file to pin ClickHouse there). - A load balancer is assigned automatically to Middleware's ingress on deploy.
Cloud-Specific Prerequisites#
AWS (EKS)#
Make sure the Amazon EBS CSI driver add-on is installed.
Storage class: exactly one storage class must be marked as default, it must use the EBS CSI driver (
ebs.csi.aws.com), and it must allow volume expansion. Clusters on EKS 1.30 or later have no default storage class, so create one:bashcat <<'EOF' | kubectl apply -f - apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: gp3 annotations: storageclass.kubernetes.io/is-default-class: "true" provisioner: ebs.csi.aws.com parameters: type: gp3 fsType: ext4 volumeBindingMode: WaitForFirstConsumer allowVolumeExpansion: true reclaimPolicy: Delete EOFIf another class (for example
gp2) is also marked as default, remove its default mark:bashkubectl annotate sc gp2 storageclass.kubernetes.io/is-default-class-Verify with
kubectl get sc: exactly one class shows(default), and itsALLOWVOLUMEEXPANSIONistrue.Keep all default settings which AWS suggests while creating the cluster for permissions and roles.
To get kubeconfig, run this in cloudshell:
bashaws eks update-kubeconfig --region {{region_in_which_cluster_deployed}} --name {{your_cluster_name}} cat /home/cloudshell-user/.kube/configAdd users in cluster IAM access entries (Click on cluster > Access tab).
S3 bucket to store telemetry data, used only by this Middleware install (don't share it with other data or another install). Middleware accesses it with this policy, limited to the bucket:
json{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:ListBucket", "s3:AbortMultipartUpload", "s3:ListBucketMultipartUploads"], "Resource": ["arn:aws:s3:::YOUR_BUCKET", "arn:aws:s3:::YOUR_BUCKET/*"] }] }Don't add S3 lifecycle rules that delete objects or move them to archive storage (such as Glacier) on this bucket: Middleware deletes old data itself, and objects removed or archived by S3 make that data unreadable. A rule that only aborts incomplete multipart uploads is fine.
S3 access#
Create an IAM user with an access key (access key ID + secret) and attach the bucket policy above to it, so the key can access only this bucket. generate-values.sh asks for the key.
Available from chart version 0.0.5, on EKS.
Instead of an IAM user, Middleware's ClickHouse can reach the bucket through an IAM role, using IAM Roles for Service Accounts (IRSA). Only the ClickHouse pods get the role, through their own service account mw-clickhouse. Don't attach the role to the nodes.
Check the cluster has an IAM OIDC provider, and create one if not:
bashaws eks describe-cluster --name YOUR_CLUSTER_NAME --query "cluster.identity.oidc.issuer" --output text eksctl utils associate-iam-oidc-provider --cluster YOUR_CLUSTER_NAME --approveCreate an IAM role with the bucket policy above as its permissions, and this trust policy. Replace
YOUR_ACCOUNT_ID, andYOUR_OIDC_PROVIDERwith the issuer from step 1 withouthttps://(for exampleoidc.eks.ap-south-1.amazonaws.com/id/EXAMPLED539D4633E53DE1B71EXAMPLE):json{ "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "Federated": "arn:aws:iam::YOUR_ACCOUNT_ID:oidc-provider/YOUR_OIDC_PROVIDER" }, "Action": "sts:AssumeRoleWithWebIdentity", "Condition": { "StringEquals": { "YOUR_OIDC_PROVIDER:sub": "system:serviceaccount:mw:mw-clickhouse", "YOUR_OIDC_PROVIDER:aud": "sts.amazonaws.com" } } }] }mw:mw-clickhouseis for the default namespace and release namemw. With other names it's<namespace>:<release>-clickhouse.Keep the role ARN for the values file (
generate-values.shasks for it).
TLS certificate#
A certificate and private key for your domain and its wildcard (for example mw.your-company.com and *.mw.your-company.com), as files. They are copied into the install folder and HAProxy in the cluster terminates TLS.
generate-values.sh asks whether the load balancer is internet-facing (default) or internal, and which networks may reach it. Decide both before installing: changing them later replaces the load balancer, or, without the AWS Load Balancer Controller, needs the Middleware load balancer service recreated.
Available from chart version 0.0.5, on EKS.
Instead of certificate files, an AWS Network Load Balancer can terminate TLS with a certificate in AWS Certificate Manager (ACM), so the private key never leaves AWS.
- ACM certificate for your domain and its wildcard (for example
mw.your-company.comand*.mw.your-company.com; add the wildcard as a second name), in the same region as the cluster: request one in ACM (DNS validation) or import your existing certificate into ACM. ACM renews certificates it issued; an imported certificate must be re-imported before it expires. Keep the certificate ARN for the values file. - AWS Load Balancer Controller installed on the cluster (AWS guide). It creates the load balancer and supports the HTTP/2 setting the agents need for gRPC. It needs:
- its own IAM role (IRSA), with the IAM policy from the AWS guide
- access from the cluster to the EC2, Elastic Load Balancing, ACM and STS APIs (through a NAT gateway or VPC endpoints)
- if your node security groups restrict inbound traffic from the EKS control plane, a rule allowing TCP port 9443 from the control plane, so it can reach the controller's webhook
- subnets tagged
kubernetes.io/role/elb=1for an internet-facing load balancer, orkubernetes.io/role/internal-elb=1for an internal one
- The load balancer is internet-facing by default, so agents outside your network can send data. Choose internal in
generate-values.shif every agent and user is inside your network, and optionally list the networks (CIDRs) allowed to reach it. - Your DNS records (
mw.your-company.comand*.mw.your-company.com) must point directly at the load balancer. A DNS proxy that terminates TLS in front of it (for example a proxied CDN record) breaks agent traffic.
Azure (AKS)#
- A storage account, its key and secret.
- A Blob container to store telemetry data.
- Get kubeconfig from cloudshell of Azure.
Credentials#
⚠️ Passwords are fixed at the first install. Changing them later needs a manual rotation procedure.
- Owner email + password — first UI login. The account is activated during install, so no activation email is sent.
- Datastore passwords (Postgres, Redis, ClickHouse) — generated automatically by the install kit and stored in your values file; keep that file for every upgrade.
- Password rules — minimum 8 characters, letters and digits (not only numbers), always in quotes in YAML.
Checklist#
- [ ] Registry credentials and installation guide received
- [ ] Cluster created as per sizing table, kubeconfig working with cluster-admin
- [ ]
helm,kubectl,opensslinstalled - [ ] One default storage class with volume expansion enabled (
kubectl get sc) - [ ] Bucket/container created, with its access set up
- [ ] Domain and SSL certificate ready, covering the domain and its wildcard
- [ ] Outbound access approved, for every host in Outbound URLs
- [ ] Security team approved the storage access key and the SSL private key in the cluster
- [ ] Public or internal endpoint decided
- [ ] Owner email and password decided
Need assistance or want to learn more about Middleware? Get in touch with us via our Contact Us or join our Slack channel.
What did you think of this content?