Posts

Showing posts with the label kubernetes

ML self-service pipeline that abstracts Kubernetes complexity

  To successfully bridge the gap between machine learning engineering and cluster operations, you need to build a self-service pipeline that abstracts Kubernetes complexity . The goal is to let ML practitioners provision GPUs and scale workloads using simple configurations, while Operations maintains guardrails around costs and resources. Here is the operational blueprint to build, scale, and operationalize your ML-focused Kubernetes platform. 1. Provision the ML Development Cluster Setting up a dedicated ML development cluster requires integrating hardware acceleration into the Kubernetes control plane from day one. Select the Infrastructure: Use cloud-managed services (AWS EKS, GCP GKE, or Azure AKS) for stable control planes and automated node OS provisioning. Install GPU Drivers: Deploy the NVIDIA GPU Operator via Helm. This automatically manages the NVIDIA driver, container toolkit, and device plug-in across all GPU nodes. Configure Node Pools: Create distinct, labeled nod...

Simple FastAPI App with Docker and Minikube

 Let's start with the simplest one. Which we can develop and test in our local system or laptop, or Mac. ✅ Simple FastAPI App with Docker and Minikube (Kubernetes) 📁 Folder Structure fastapi-k8s-demo/ ├── app/ │ └── main.py ├── Dockerfile ├── requirements.txt ├── k8s/ │ ├── deployment.yaml │ └── service.yaml 📄 app/main.py from fastapi import FastAPI app = FastAPI() @app.get("/") def read_root(): return {"message": "Hello from FastAPI on Kubernetes!"} 📄 requirements.txt fastapi uvicorn 📄 Dockerfile FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app/ . CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] 📄 k8s/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: fastapi-deployment spec: replicas: 1 selector: matchLabels: app: fastapi template: metadata: ...