Skip to content

AI

A Kubernetes Chaos Engineering Toolkit with AI-Powered Analysis

TL;DR: I built a chaos engineering toolkit that runs five experiment types against Kubernetes clusters and uses AWS Bedrock to analyze the results and recommend resilience improvements.

The Problem

"Our system is resilient" is a claim, not a fact, until you've tested it. Most teams discover their failure modes during actual incidents -- the worst possible time. I needed a way to systematically inject failures into Kubernetes workloads, observe how the system responds, and get actionable recommendations, not just pass/fail results.

What I Built

chaos-engineering is a CLI-driven toolkit that defines experiments as YAML manifests (CRD-style), executes them against a target Kubernetes cluster, collects metrics during the blast radius, and feeds everything into AWS Bedrock for AI-powered analysis. The AI doesn't just say "the pod restarted" -- it explains whether the recovery was fast enough, what the impact radius was, and what to harden next.

  • 5 experiment types -- pod kill (random pod termination), network latency (tc netem injection), CPU stress (stress-ng on target nodes), disk fill (hostPath exhaustion), and DNS failure (CoreDNS SERVFAIL injection)
  • Declarative experiment plans -- define target namespace, label selectors, duration, and success criteria in YAML
  • AI-powered analysis -- Bedrock correlates experiment timeline with cluster metrics and provides a risk assessment with specific remediation steps
  • Dry-run mode -- validate experiments and see what would be affected without injecting any faults
  • HTML results dashboard -- a self-contained visualization of experiment timelines, impact metrics, and AI recommendations

Tech Stack

Python, Kubernetes (kubectl), AWS Bedrock, Docker, stress-ng, tc/netem, Terraform, GitHub Actions

Usage

# manifests/experiment-pod-kill.yml
apiVersion: chaos.xops.io/v1alpha1
kind: ChaosExperiment
metadata:
  name: kill-frontend-pods
spec:
  type: pod-kill
  target:
    namespace: production
    labelSelector:
      matchLabels:
        app: frontend
  schedule:
    duration: 60s
    count: 3
# Dry-run to preview impact
chaos --manifest manifests/experiment-pod-kill.yml --dry-run

# Execute with AI analysis
chaos --manifest manifests/experiment-pod-kill.yml --analyze

# Export results
chaos --manifest manifests/experiment-network.yml --output json --outfile results.json

Results

Running weekly chaos experiments surfaced three critical resilience gaps: a service without a PodDisruptionBudget that went fully unavailable during pod kills, a DNS-dependent service with no caching that cascaded failures during DNS experiments, and a CPU-bound workload with no horizontal autoscaler. Each was caught and fixed before a real incident.


GitHub: https://github.com/basel5001/chaos-engineering

Building an Internal Developer Platform with an AI Advisor

TL;DR: I built a self-hosted developer portal where teams register services, provision AWS environments with one click, track costs, and get AI-powered infrastructure recommendations -- all backed by FastAPI and Terraform.

The Problem

Developers shouldn't need to write Terraform to spin up a staging environment. They also shouldn't wait three days for an ops ticket to get resolved. At the same time, giving everyone raw AWS console access is a recipe for cost blowouts and security incidents. I needed a paved road: self-service with guardrails.

What I Built

Cloud Platform is an Internal Developer Portal that wraps Terraform behind a REST API and a dark-themed single-page dashboard. Developers register their services, click "Create Environment," and the platform runs terraform plan && terraform apply under the hood -- provisioning VPCs, ALBs, ECS services, or Lambda functions.

  • Service Catalog -- register and track microservices by type (web, API, worker) with ownership metadata
  • Self-Service Provisioning -- create dev/staging/prod environments in one click; Terraform runs behind the scenes
  • AI Advisor -- ask AWS Bedrock (Claude Haiku) for infrastructure recommendations, Terraform code generation, and cost explanations
  • Cost Tracking -- per-service cost breakdown pulled from AWS Cost Explorer daily
  • Zero-Build Dashboard -- a single-page HTML app with Tailwind CSS; no Node build step required

Tech Stack

Python, FastAPI, SQLite, Terraform, AWS Bedrock (Claude), Tailwind CSS, AWS (ECS, Lambda, VPC, ALB, Cost Explorer)

Usage

# Start the platform
make dev
# Open http://localhost:8000

# Register a service via API
curl -X POST http://localhost:8000/api/services \
  -H "Content-Type: application/json" \
  -d '{"name": "payment-api", "type": "api", "owner": "platform-team"}'

# Ask the AI advisor
curl -X POST http://localhost:8000/api/ai/suggest \
  -d '{"question": "What instance type should I use for a Node.js API handling 500 RPS?"}'

Results

Environment provisioning dropped from a multi-day ticket-based process to under five minutes. The AI advisor handles the most common "how should I architect this?" questions that used to land in the platform team's Slack channel. Cost visibility per service caught two orphaned environments in the first week, saving roughly $400/month.


GitHub: https://github.com/basel5001/cloud-platform

Autopilot Social Media: How n8n and AI Publish Content While I Sleep

TL;DR: I built an n8n automation that generates social media posts with GPT-4o, schedules them, and publishes across Facebook, Twitter, LinkedIn, and Instagram -- completely hands-free.

The Problem

Maintaining a consistent social media presence across four platforms is a full-time job. Each platform has different optimal posting times, character limits, and content styles. Hiring a social media manager is expensive. Using scheduling tools like Buffer or Hootsuite still requires you to write every post manually. I wanted something that generates the content, adapts it per platform, and publishes on schedule -- without me touching it after initial setup.

What I Built

n8n-social-automation is a self-hosted n8n workflow that uses GPT-4o to generate platform-specific social media content from a topic list, then publishes it on a schedule via each platform's API. The entire pipeline -- from content generation to publishing -- runs in Docker with zero manual intervention.

  • AI content generation -- GPT-4o writes posts tailored to each platform's style: professional for LinkedIn, punchy for Twitter, conversational for Facebook, visual-caption style for Instagram
  • Topic queue -- maintain a simple list of topics or RSS feeds; the workflow picks the next topic and generates fresh content
  • Multi-platform publishing -- posts to Facebook Pages, Twitter/X, LinkedIn company pages, and Instagram via their respective APIs
  • Scheduling -- configurable posting schedule per platform with timezone awareness
  • Image generation -- optionally generates accompanying images using DALL-E for visual platforms
  • Content review mode -- optional approval step that sends drafts to Slack before publishing
  • Analytics webhook -- receives engagement data back into n8n for tracking performance

Tech Stack

n8n, OpenAI GPT-4o, Docker, Facebook Graph API, Twitter API v2, LinkedIn API, Instagram API, Node.js

Usage

# Start n8n with Docker
git clone https://github.com/basel5001/n8n-social-automation.git
cd n8n-social-automation
cp .env.example .env  # add API keys
docker compose up -d

# Access n8n at http://localhost:5678
# Import the workflow JSON and activate it

Results

Over a 30-day test period, the automation published 120 posts across four platforms with zero manual intervention after setup. LinkedIn posts generated an average of 340 impressions each. The GPT-4o content required manual editing less than 5% of the time when content review mode was enabled. Total API costs for the month: approximately $8 for OpenAI, with all other platform APIs being free tier.


GitHub: https://github.com/basel5001/n8n-social-automation

An AI That Turns Your Notes into Quizzes

TL;DR: I built a web app where you paste study material and an AI generates multiple-choice quizzes from it -- making active recall effortless for students and self-learners.

The Problem

Passive reading is the least effective way to learn, but it is what most students default to. Active recall -- testing yourself on material -- is consistently shown to be one of the most effective study techniques. The problem is that creating good quiz questions takes time. Students either skip self-testing entirely or use pre-made flashcard decks that do not match their specific course material. I wanted a tool where you paste your notes and get a tailored quiz in seconds.

What I Built

study-buddy-ai is a full-stack application with a React frontend and a FastAPI backend that connects to AWS Bedrock for AI-powered quiz generation. Upload a PDF, paste text, or type a topic, and the AI generates multiple-choice questions with explanations for each answer.

  • Multiple input modes -- paste raw text, upload a PDF, or simply name a topic and let the AI generate questions from its knowledge
  • Configurable quizzes -- choose the number of questions, difficulty level, and whether to include explanations
  • Instant feedback -- answers are checked in real time with detailed explanations for both correct and incorrect choices
  • Score tracking -- results are stored locally so you can track improvement over time
  • Topic extraction -- the AI identifies key concepts from your material and generates questions that target them specifically
  • Clean, distraction-free UI -- a minimal React interface designed for focused study sessions

Tech Stack

React, TypeScript, FastAPI, Python, AWS Bedrock (Claude), Tailwind CSS, Vite

Usage

# Start the backend
cd backend
pip install -r requirements.txt
uvicorn main:app --reload

# Start the frontend
cd frontend
npm install && npm run dev

# Open http://localhost:5173

Paste your study notes, select quiz options, and click "Generate Quiz." The AI returns formatted questions within seconds.

Results

Testing with university-level biology and computer science notes, the AI generates contextually accurate questions roughly 90% of the time. Students in a small pilot group reported spending 40% less time creating study materials and scored an average of 12% higher on practice exams compared to passive review alone. The Bedrock integration keeps per-quiz costs under $0.01.


GitHub: https://github.com/basel5001/study-buddy-ai