apiVersion: apps/v1
kind: Deployment
metadata:
name: rds-forwarder-deployment
namespace: default
labels:
app: rds-forwarder
spec:
replicas: 1 # You can adjust the number of replicas as needed
selector:
matchLabels:
app: rds-forwarder # This must match the labels in the pod template
template:
metadata:
labels:
app: rds-forwarder # Labels for the Pod(s) created by this deployment
spec:
containers:
- name: socat
image: alpine/socat
args:
- tcp-listen:3306,fork,reuseaddr
- tcp-connect:mysql-bue-eks.c9qc828su0q4.ap-south-1.rds.amazonaws.com:3306
ports:
- containerPort: 3306 # Good practice to declare the port
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
---
apiVersion: v1
kind: Service
metadata:
name: rds-forwarder-service
namespace: default
spec:
selector:
app: rds-forwarder
ports:
- protocol: TCP
port: 3306
targetPort: 3306
type: ClusterIP
# Cluster Stress Testing - CPU and Memory Load
```yaml
apiVersion: v1
kind: Pod
metadata:
name: cpu-stress-arm
spec:
containers:
- name: stress
# This image supports linux/amd64, linux/arm64, linux/ppc64le, and linux/s390x
image: ghcr.io/colinianking/stress-ng:latest
resources:
limits:
cpu: "2"
requests:
cpu: "0.5"
args:
- "--cpu"
- "2"
- "--timeout"
- "1200s"
restartPolicy: Never