Documentation Index
Fetch the complete documentation index at: https://docs.ahmadraza.in/llms.txt
Use this file to discover all available pages before exploring further.
Debug Pod - Cluster Troubleshooting
This is a debug pod which can be used to troubleshoot issues within the cluster. this have all the utilities installed like :
- curl
- wget
- netcat
- iputils
- tcpdump
This pod sleep for 10 hours after that it will be delete automatically
apiVersion: v1
kind: Pod
metadata:
name: debug-tools
# namespace: default
spec:
containers:
- name: netshoot
image: nicolaka/netshoot
command: ["sleep", "36000"]
# resources:
# requests:
# memory: "64Mi"
# cpu: "50m"
# limits:
# memory: "128Mi"
# cpu: "100m"
RDS Forwarder - EKS to Private RDS Connection
Overview
This deployment creates a bridge to access private RDS MySQL database through EKS cluster.
Quick Start
1. Deploy the forwarder: kubectl apply -f rds-forwarder.yaml
2. Start port forwarding: kubectl port-forward deployment/rds-forwarder-deployment 3307:3306
3. Connect locally: mysql -h 127.0.0.1 -P 3307 -u username -p database_name
Architecture
Local (3307) → kubectl port-forward → EKS Pod (3306) → Private RDS MySQL (3306)
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