A production-grade like Open Source Kubernetes operator to manage AWS EC2 instances with a real-time, glassmorphism-styled dashboard and a full observability stack.
- Declarative AWS EC2 Management: Provision, update, and terminate instances using simple
Ec2InstanceCustom Resources. - Automatic Drift Detection: Continuously monitors the state of your instances in AWS and reconciles any changes back to the desired Kubernetes state.
- Unified Observability Stack: Pre-configured integration with Prometheus (metrics), Grafana (dashboards), Jaeger (distributed tracing), and OpenCost (cost monitoring).
- Production-Ready Helm Chart: Easily deploy and manage the entire stack with a single Helm command.
- Secure by Design: Supports isolated AWS credential management via Kubernetes secrets.
- Premium Glassmorphism Design: A stunning, modern interface with smooth animations and interactive components.
- Real-Time Streaming Updates: Uses Server-Sent Events (SSE) to provide instantaneous updates on instance status without manual page refreshes.
- Live Metrics Dashboard: Visual representation of operator health, including total reconciliations and AWS API latency stats.
- Integrated Instance Logs: View real-time logs of the reconciliation process directly from the UI, similar to ArgoCD.
- UI Personalization: Save user preferences (Name, Profession, Team) that persist across sessions using Kubernetes ConfigMaps.
- Responsive Layout: Optimized for both ultra-wide monitors and standard displays.
- Minikube (or any K8s cluster) installed and running.
- Helm v3+ and AWS CLI configured (
aws configure).
The operator requires AWS credentials. You can provide them in two ways:
During installation, set the values directly via the CLI:
--set awsCredentials.accessKeyId="YOUR_KEY" --set awsCredentials.secretAccessKey="YOUR_SECRET"Create a secret in the target namespace before installing:
kubectl create namespace operator-system
kubectl create secret generic aws-credentials \
--from-literal=AWS_ACCESS_KEY_ID=YOUR_KEY \
--from-literal=AWS_SECRET_ACCESS_KEY=YOUR_SECRET \
-n operator-systemInstall the operator directly from the GitHub Container Registry:
# Create namespace if it doesn't exist
kubectl create namespace operator-system
# Install the operator and the full observability stack
helm install ec2-operator oci://ghcr.io/iam-karan-suresh/charts/ec2-operator \
--version 1.1.1 \
-n operator-system \
--set awsCredentials.region="us-east-1"To upgrade to the latest version:
helm upgrade ec2-operator oci://ghcr.io/iam-karan-suresh/charts/ec2-operator \
--version 1.1.1 \
-n operator-systemIf you are modifying the UI, rebuild and push the container image:
docker build -t docker.io/karanwebdev/ec2-dashboard:v1.1.1 -f Dockerfile.dashboard .
docker push docker.io/karanwebdev/ec2-dashboard:v1.1.1Package the chart and push it to the OCI registry:
helm package dist/chart
helm push ec2-operator-1.1.1.tgz oci://ghcr.io/iam-karan-suresh/chartsIf you use a private repository for your images:
kubectl create secret docker-registry ghcr-pull-secret \
--docker-server=ghcr.io \
--docker-username="<GH_USERNAME>" \
--docker-password="<GH_TOKEN>" \
-n operator-systemExpose the dashboard locally:
kubectl port-forward svc/operator-dashboard -n operator-system 3000:3000Open http://localhost:3000.
Monitor the operator's backend reconciliation activity:
kubectl logs -n operator-system -l control-plane=controller-manager -c manager --tail=100- Grafana:
kubectl port-forward svc/operator-grafana -n operator-system 8080:80(Go to http://localhost:8080) - Jaeger Tracing: View AWS SDK traces at
http://localhost:16686(via dashboard or port-forward). - Prometheus: Raw metrics available via
operator-prometheus-server.
Create your first instance by applying this YAML:
apiVersion: compute.cloud.com/v1
kind: Ec2Instance
metadata:
name: prod-web-server
spec:
region: "us-east-1"
amiID: "ami-0c55b159cbfafe1f0" # Amazon Linux 2
instanceType: "t3.micro"
volume: 25 # (Optional) Root volume size in GBFor a full local environment with 6 CPUs and 6GB RAM, use the automated deployment script:
./scripts/deploy-minikube.shThis script will:
- Provision a Minikube cluster with optimized resources.
- Build local Docker images for the Operator & Dashboard.
- Deploy the local Helm chart with
imagePullPolicy: Never. - Provide URLs for all observability tools (Grafana, Jaeger, etc.).
For more internal details, refer to: