CloudBot LO3

cloudcomputing.haarshanmohan.com

Live BTC/USD Orderbook Paper-Trader (K3s) & Global Exchange Arbitrage Scanner (Cloudflare FaaS)

100% LIVE FEED
LO3.1 IaC Terraform State
Terraform IaC: Configured (217.217.253.95)
DNS + CF Worker + K3s (3 Pods + HPA)
LO3.2 K8s Active Kubernetes Pod / Host
connecting...
Node: ... | Seen: 0 replica(s)
LO3.3 FaaS Serverless Worker
Serverless FaaS: Idle ($0 cost)
On-demand Cloudflare Edge Function
LO3.4 CI/CD GitHub Actions → GHCR → K3s
Build: v1.0.0 (Buy Dip 0.5%)
Zero-downtime K8s rolling update
BTC / USD Live Spot
Loading...
Connecting to exchange...
Total Portfolio Equity
$10,000.00
PnL: +$0.00 (0.00%)
Available Cash (USD)
$10,000.00
Order Size: $2,500 / trade
Virtual BTC Position
0.00000 BTC
Avg Entry: —
Active Bot Strategy
Buy Dip: 0.5%
Take Profit: +0.8%
K8s Pod Traffic Split
0 reqs
Live Downward API
KUBERNETES 24/7 STATEFUL WORKLOAD Pod/Host: ...

Real-Time BTC/USD Orderbook Feed & Paper-Trading Engine

Live Best Bid: —
Live Best Ask: —
24h High / Low: —
24h Volume: —
Real BTC/USD (1m Candles + 2s Ticks) Session High (—) Auto-BUY Dip Trigger (—)
Feed: Connecting... | Drawdown from Session High: 0.00%
Last Tick Processed By: ...

Live Paper-Trade Execution Log

Executes at real live exchange orderbook Bid/Ask prices and logs the serving Kubernetes Pod

0 Trades Executed
Time Action Fill Price Amount / Value PnL / Reason Kubernetes Pod / Host
No paper trades executed yet. Click + Market BUY ($2,500 @ Live Ask), Capture Arbitrage Spread, or wait for a real 0.5% BTC dip.
SERVERLESS COMPUTING (FaaS — LO3 LESSON 3)

Real-Time Global Exchange Arbitrage Scanner

Queries live Level-1 Orderbooks (`Spot`, `Bid`, `Ask`, `24h Vol`) across Coinbase, Kraken, Bitstamp, and Gemini in parallel—costing $0.00 when idle.

FaaS Endpoint:
Cheapest Ask (Buy)
Scanning...
—
Highest Bid (Sell)
Scanning...
—
Real Spot Spread
—
Bid−Ask: —
Fetching live orderbooks from Coinbase, Kraken, Bitstamp, and Gemini...
DOCKER & KUBERNETES ORCHESTRATION (LO3 LESSON 2)

K3s Cluster Control Plane & Pod Replicas

Displays the real `POD_NAME` (`metadata.name`) or container hostname serving each HTTP request via the Kubernetes Downward API:

GET /api/pod-info (Live Downward API Response) —

          

How CloudBot Covers Every Learning Objective 3 (LO3) Requirement

Live architectural breakdown for Cloud Computing Essentials classroom demonstration

VPS Target: 217.217.253.95 | Namespace: cloudbot-ns | Service: NodePort 30080
1. IaC with Terraform
Single `terraform apply`

`terraform/main.tf` manages the Cloudflare `A` DNS record (`cloudcomputing.haarshanmohan.com` → `217.217.253.95`), deploys the Cloudflare Worker script, and creates the K3s Namespace, 3-Pod Deployment, NodePort Service, and HPA.

2. Docker & Kubernetes
Control Plane, Node & 3 Pods

Containerized via a multi-stage Node-Alpine `Dockerfile` and orchestrated by K3s with 3 Replicas. Uses the Kubernetes Downward API to inject `metadata.name` (`POD_NAME`) into the live UI header.

3. K8s vs. Serverless (FaaS)
Hybrid Cloud Workload Split

Stateful 24/7 price streaming runs on Kubernetes Pods, while bursty cross-exchange arbitrage scanning runs on-demand via a Cloudflare Worker (`worker.js`) with $0 idle cost.

4. CI/CD Pipelines
GitHub Actions → GHCR → K3s

Pushing a strategy change (like `BUY_DIP_PERCENT`) to `main` validates syntax, builds & pushes the Docker image to `ghcr.io`, and triggers a zero-downtime `kubectl rollout restart` across all 3 Pods.