INFINITY-PIPELINE

Detailed Project Portfolio
Mehmet Magden | Email | GitHub | LinkedIn | +41 76 680 00 53
Bern, Switzerland | May 2026

1. Introduction

Infinity-Pipeline is a Kubernetes laboratory project I developed between March and May 2026 to acquire deep expertise in DevOps and Cloud-Native infrastructure. The project demonstrates the practical implementation of modern system administration: automating a complete cluster from scratch, ensuring scalability, and deploying it into a production-ready state.

Project Scope

A local Kubernetes system comprising one master and three worker nodes, fully automated with Ansible, orchestrated by Kubernetes, and running a Python Flask application (SwissTask) backed by PostgreSQL.

Development Environment

Transparency Note: AI-Assisted Development

Modern software engineering demands maximum efficiency. In this project, generative AI was leveraged as a "pair-programming" partner. While AI assisted with troubleshooting, generating boilerplate code, and syntax optimization, the architectural decisions, Infrastructure as Code (IaC) design, DevSecOps concepts, and final code responsibility remained entirely mine. This reflects my real-world workflow: utilizing modern tools efficiently without relinquishing architectural control.

2. Technical Architecture

2.1 Cluster Topology

The project consists of four virtual machines, all based on Ubuntu 22.04 LTS:

Kubernetes Cluster (192.168.56.0/24) ├── Master Node (k8s-master, 192.168.56.10) │ └── Control Plane: API Server, etcd, Scheduler └── Worker Nodes (3x) ├── k8s-w1 (192.168.56.11) ├── k8s-w2 (192.168.56.12) └── k8s-w3 (192.168.56.13) Network: Flannel CNI Container Runtime: Containerd Kubernetes Version: v1.28

2.2 Application Stack & DevSecOps

The SwissTask application integrates industry-standard DevOps and security practices:

Component Technology Details
API & Validation Flask, Pydantic CRUD endpoints with strict payload validation against SQL Injection
API Documentation Flasgger (Swagger) Auto-generated, interactive OpenAPI 3.0 specification
Security Scans Trivy, Bandit SAST (Static Application Security Testing) & Container Vulnerability Scanning
Database PostgreSQL 15 StatefulSet with Persistent Volume
Authentication Kubernetes Secrets Base64-encoded DB credentials
Network Access Cloudflare Tunnel Secure external connection ("Zero-Trust") without open router ports
Monitoring Prometheus + Grafana Real-time metrics and visualization

2.3 Infrastructure as Code

All system components are automated via Ansible. The playbooks execute in a deterministic sequence:

3. Deployment & Automation

3.1 DevSecOps CI/CD Pipeline

A push to the main branch triggers the GitHub Actions pipeline, which incorporates built-in security gates:

Push → Security Gates → Test → Build & Scan → Push to Docker Hub → Deploy ↓ ↓ ↓ ↓ ↓ ↓ Code Bandit/Flake8 pytest Docker/Trivy Git SHA Tag kubectl rollout (SAST/Lint) (SQLite) (Vuln. Check) (Immutable) (Rolling Update)

Key Feature: Images are not tagged with :latest, but rather with the unique Git Commit-SHA. This effectively prevents image caching issues and ensures deployments are 100% reproducible.

3.2 Rolling Updates

New versions are deployed via Kubernetes Rolling Updates to ensure high availability:

3.3 Self-Healing Mechanisms

Kubernetes autonomously monitors and maintains cluster health:

4. Engineering Challenges & Solutions

4.1 Kubelet Health-Check Collision (CrashLoopBackOff)

Problem: To protect against DDoS attacks, the API was secured with a strict rate limiter (50 requests/hour). The internal Kubernetes Kubelet service, which executes Liveness and Readiness probes every 10 seconds, quickly exceeded this limit, receiving HTTP 429 (Too Many Requests) errors. Consequently, Kubernetes falsely flagged completely healthy pods as "failing" and continuously terminated them, causing a severe CrashLoopBackOff.

Root Cause: The rate limiter failed to distinguish internal cluster health-check traffic from external, potentially malicious requests.

Solution: Analyzed the internal traffic routing and implemented targeted @limiter.exempt decorators explicitly for the internal probes:

@app.route('/health', methods=['GET'])
@limiter.exempt
def health_check():
    """Kubernetes liveness probe bypasses rate limits"""
    # ...

Result: Internal K8s monitoring functions seamlessly (0 Restarts), while all external API endpoints remain strictly protected against DDoS abuse.

4.2 Kubernetes Swap Issue

Problem: Worker nodes failed to start pods, returning the error: "cannot run on a system with swap enabled".

Root Cause: Kubernetes does not operate stably when Linux Swap is enabled, as the Kubelet service terminates itself to preserve memory allocation accuracy.

Solution: Permanently disabled swap across all nodes via Ansible automation:

- name: Disable swap
  shell: swapoff -a
- name: Remove from fstab
  lineinfile:
    path: /etc/fstab
    regexp: "^.* swap"
    state: absent

Result: The cluster operates stably, and pods are scheduled reliably.

4.3 Docker Image Caching

Problem: Following a successful CI/CD image rebuild, newly spawned pods continued executing the old application code.

Solution: Transitioned to an "Immutable Tags" strategy. Images are now strictly tagged with the unique Git Commit-SHA:

docker push myrepo/app:${{ github.sha }}

Result: Every deployment guarantees the extraction of the exact, updated code. Rollbacks are now deterministic and secure.

5. Conclusion & DevOps Competencies

5.1 Acquired Competencies

This project serves as a practical demonstration of my deep understanding of modern Cloud-Native architectures:

5.2 Deployment Readiness

Infinity-Pipeline is production-ready for demonstration purposes. To deploy the system onto physical cloud servers, only the IP addresses in the ansible/inventory.ini file need to be updated prior to executing the Ansible playbooks.

Project Statistics:
Timeline: March – May 2026
Git Commits: 31
Lines of Code: ~2000+ (Ansible YAML, Python, Kubernetes Manifests)
Repository: github.com/MehmetMagden/infinity-pipeline