README
ΒΆ
π CloudInferOps
CloudInferOps β One Command Kubernetes Observability Platform
CloudInferOps is a Go-based DevOps/SRE CLI that detects your environment, validates Kubernetes readiness, installs lightweight Kubernetes when needed, and deploys a production-style observability stack with metrics, logs, traces, dashboards, and alerts.
Quick Start β’ Features β’ Architecture β’ Commands β’ Testing β’ CI/CD β’ Author
π₯ Demo Video
π What is CloudInferOps?
CloudInferOps turns any Kubernetes-compatible environment into a complete observability platform.
It works on:
- π» Local Linux machines
- βοΈ AWS EC2 instances
- βοΈ GCP Compute Engine VMs
- βοΈ Azure VMs
- βΈοΈ Existing Kubernetes clusters
- π§ͺ Kubernetes clusters such as kubeadm and custom setups
CloudInferOps follows a simple workflow:
sudo curl -sSL https://raw.githubusercontent.com/shivamshashank/CloudInferOps/main/scripts/install.sh | sudo bash
sudo cloudinferops deploy all
sudo cloudinferops status
β¨ Features
π§ Smart Environment Detection
- Detects OS and CPU architecture
- Detects
kubectl - Detects Kubernetes cluster availability
- Detects Helm
- Checks memory, CPU, ports, storage class, and namespace permissions
- Warns about existing observability stack conflicts
βΈοΈ Kubernetes First
- Uses existing Kubernetes cluster if available
- Installs kubeadm when Kubernetes is missing
- Supports local and cloud VM environments
- Works consistently across local Linux, AWS EC2, GCP VM, and Azure VM
π Full Observability Stack
| Layer | Component |
|---|---|
| Metrics | Prometheus |
| Dashboards | Grafana |
| Logs | Loki |
| Traces | Tempo |
| Continuous Delivery | ArgoCD |
| Telemetry Pipeline | OpenTelemetry Collector |
| Alerts | Alertmanager |
| Node Metrics | Node Exporter |
| Kubernetes Metrics | kube-state-metrics |
| Log Collection | Grafana Alloy / Promtail |
| Endpoint Monitors | Blackbox Exporter |
| Continuous Profiler | Pyroscope |
| HA Long-Retention | Thanos (Optional HA) |
| Incident Routing | Slack, PagerDuty |
π¨ Incident & Alerting
- Slack alert integration
- PagerDuty alert integration
- Alertmanager webhook support
- Test alert command
- Prebuilt SRE alert rules
π Dashboards Included
- Kubernetes cluster overview
- Node CPU, memory, disk
- Pod health
- Container metrics
- Namespace usage
- Loki logs dashboard
- Tempo traces dashboard
- Alertmanager overview
- Resource usage dashboard
β‘ Quick Start
1. Install CloudInferOps
sudo curl -sSL https://raw.githubusercontent.com/shivamshashank/CloudInferOps/main/scripts/install.sh | sudo bash
Verify installation:
cloudinferops version
2. Check Your System
[!IMPORTANT] Sudo Privileges Required CloudInferOps requires administrative/root privileges (
sudo) to manage system observability resources, check system metrics, and set up networking or local clusters.
sudo cloudinferops doctor
Example output:
CloudInferOps Doctor
[OK] OS: linux/amd64
[OK] Internet connection
[OK] kubectl found
[WARN] Kubernetes cluster not detected
[OK] Helm found
[OK] Minimum memory: 4GB+
[OK] Minimum CPU: 2 cores+
[INFO] Run: sudo cloudinferops deploy all
If Kubernetes already exists:
[OK] Kubernetes cluster detected
[OK] Current context: kind-dev
[OK] Nodes ready: 1
[OK] Helm found
[OK] StorageClass found
[READY] Run: sudo cloudinferops deploy all
3. Deploy All Components & Auto-bootstrap Kubernetes
To deploy all CloudInferOps components (observability, inference model gateway, self-hosted UI, and webhook handler), simply run:
sudo cloudinferops deploy all
[!TIP] No Kubernetes? No problem! If CloudInferOps does not detect an existing Kubernetes cluster, it will automatically ask to install and bootstrap a Kubernetes cluster via
kubeadmon-the-fly, then deploy the complete platform onto it. If you already have a cluster running, it will deploy directly onto your active context.
CloudInferOps deploys:
- Observability: Prometheus, Grafana, Loki, Tempo, ArgoCD, Alertmanager, OpenTelemetry Collector, Node Exporter, kube-state-metrics, Grafana Alloy/Promtail.
- Inference Stack: Ollama backend and local gateway in the
inferencenamespace. - Web Portal: Self-hosted UI dashboard exposed at
/cloudinferops/. - Alert Gateway: Incident and webhook receiver.
4. Check Status
sudo cloudinferops status
Example:
π©Ί CloudInferOps Status Dashboard
-----------------------------------------------------------------
π Kubernetes Context: kind-cloudinferops
π¦ Namespace: observability
π System Components Checklist:
Prometheus Server: π’ Running
Grafana Dashboard: π’ Running
Loki Logging: π’ Running
Tempo Tracing: π’ Running
OTel Collector: π’ Running
ArgoCD Delivery: π’ Running
UI Portal: π’ Running
π€ Inference Services:
Inference Gateway: π’ Running
Model Backend: π’ Running (Ollama)
π¦ GitOps Overview:
Mode: ArgoCD Managed
Applications: 4
Synced: 4/4
Healthy: 4/4
π Access Dashboards & APIs via Ingress:
π Grafana Dashboard: http://127.0.0.1/grafana/
π Prometheus Server: http://127.0.0.1/prometheus/
π Alertmanager Panel: http://127.0.0.1/alertmanager/
π ArgoCD Dashboard: http://127.0.0.1/argocd
π UI Portal: http://127.0.0.1/cloudinferops/
π Inference Gateway: http://127.0.0.1/v1
ποΈ Architecture
ββββββββββββββββββββββββββββ
β CloudInferOps CLI β
β Go Binary β
βββββββββββββββ¬βββββββββββββ
β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β β β
ββββββββΌβββββββ βββββββββΌββββββββ ββββββββΌβββββββ
β Doctor β β Kubernetes β β Helm β
β Doctor β β Detection β β Deployment β
ββββββββ¬βββββββ βββββββββ¬ββββββββ ββββββββ¬βββββββ
β β β
β ββββββββββΌβββββββββ β
β β Existing K8s or β β
β β kubeadm Install β β
β ββββββββββ¬βββββββββ β
β β β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
ββββββββββββΌβββββββββββ
β observability ns β
ββββββββββββ¬βββββββββββ
β
ββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β β β
βββββββββΌβββββββββ ββββββββββΌβββββββββ ββββββββββΌββββββββ
β Prometheus β β Grafana β β Alertmanager β
β Metrics β β Dashboards β β Alerts β
βββββββββ¬βββββββββ ββββββββββ¬βββββββββ ββββββββββ¬ββββββββ
β β β
βββββββββΌβββββββββ ββββββββββΌβββββββββ ββββββββββΌββββββββ
β Node Exporter β β Loki β β Slack/PagerDutyβ
β kube-state β β Logs β β Integrations β
ββββββββββββββββββ ββββββββββ¬βββββββββ ββββββββββββββββββ
β
ββββββββββββΌβββββββββββ
β Tempo β
β Traces β
ββββββββββββ¬βββββββββββ
β
ββββββββββββΌβββββββββββ
β OpenTelemetry β
β Collector β
βββββββββββββββββββββββ
π§° CLI Commands
A complete reference of all CLI commands is available in commands.md.
Quick Reference
| Action | Command | Description |
|---|---|---|
| Install CLI | sudo curl -sSL https://raw.githubusercontent.com/shivamshashank/CloudInferOps/main/scripts/install.sh | sudo bash |
Downloads and installs the cloudinferops binary. |
| Check Environment | sudo cloudinferops doctor |
Runs diagnostics to verify system requirements and Kubernetes. |
| Deploy All | sudo cloudinferops deploy all |
Deploys the complete platform stack (observability, inference, UI portal, webhook). |
| Deploy Observability | sudo cloudinferops deploy observability |
Deploys the observability stack only. |
| Deploy Inference | sudo cloudinferops deploy inference |
Deploys Ollama and gateway in the inference namespace. |
| Deploy UI | sudo cloudinferops deploy ui |
Deploys the self-hosted portal. |
| Check Status | sudo cloudinferops status |
Shows a live dashboard with service states and Ingress URLs. |
| Interactive Uninstall | sudo cloudinferops uninstall |
Launches the interactive uninstallation menu. |
βοΈ Configuration
CloudInferOps stores local configuration at:
~/.cloudinferops/config.yaml
Example:
namespace: observability
kubernetes:
type: auto
kubeconfig: ~/.kube/config
observability:
prometheus: true
grafana: true
loki: true
tempo: true
alertmanager: true
opentelemetry: true
nodeExporter: true
kubeStateMetrics: true
logCollector: alloy
blackboxExporter: true
blackboxTargets:
- https://api.github.com
- https://github.com
pyroscope: true
thanos: false
alerts:
slack:
enabled: false
webhookUrlSecret: cloudinferops-slack-webhook
pagerduty:
enabled: false
integrationKeySecret: cloudinferops-pagerduty-key
π¨ Alert Rules
CloudInferOps includes SRE-focused alert rules:
| Alert | Description |
|---|---|
| NodeDown | Kubernetes node is not ready |
| HighCPUUsage | Node or pod CPU usage is high |
| HighMemoryUsage | Node or pod memory usage is high |
| DiskPressure | Node disk pressure detected |
| PodCrashLooping | Pod is repeatedly crashing |
| PodRestartSpike | Pod restart count increased |
| DeploymentUnavailable | Deployment has unavailable replicas |
| HighAPILatency | API latency is above threshold |
| HighErrorRate | Application error rate increased |
| PersistentVolumeAlmostFull | PVC usage is close to capacity |
π Slack & PagerDuty
Configure Slack
sudo cloudinferops alerts configure --slack
Configure PagerDuty
sudo cloudinferops alerts configure --pagerduty
Send Test Alert
sudo cloudinferops alerts test
Expected output:
Sending test alert...
[OK] Alert sent to Slack
[OK] Alert sent to PagerDuty
π§© Go Webhook Handler
CloudInferOps includes a custom Go service for incident processing.
Endpoints
GET /health
POST /webhook/alertmanager
GET /incidents
Capabilities
- Receives Alertmanager webhooks
- Parses alert payloads
- Formats incident messages
- Sends notifications to Slack
- Sends incidents to PagerDuty
- Stores recent incidents
- Exposes health and incident APIs
Deploy it with:
sudo cloudinferops deploy webhook-handler
π§ͺ Testing
Run All Tests
sudo go test ./...
Run Tests with Coverage
go test ./... -cover
Generate Coverage Report
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out
Run Vet
go vet ./...
Run Formatting Check
gofmt -w .
Run Linter
golangci-lint run
Integration Test with kind
kind create cluster --name cloudinferops-test
sudo cloudinferops doctor
sudo cloudinferops deploy observability --dry-run
sudo cloudinferops uninstall observability --dry-run
kind delete cluster --name cloudinferops-test
β Test Coverage
| Area | Tests |
|---|---|
| CLI commands | version, init, doctor, status |
| Config | Load, validate, default values |
| Doctor checks | OS, arch, kubectl, Helm, Kubernetes |
| Kubernetes | Cluster detection, namespace creation |
| Helm | Repo add, release detection, dry-run |
| Alerts | Slack payload, PagerDuty payload, test alert |
| Webhook | Alertmanager payload parsing |
| Status | Component health formatting |
| Uninstall | Dry-run and confirmation flow |
π CI/CD & GitOps
CloudInferOps uses GitHub Actions for automated testing, builds, Docker images, and releases.
CI Workflow
Runs on every push and pull request:
go test ./...
go vet ./...
gofmt -w .
golangci-lint run
Release Workflow
Create a new release by pushing a tag:
git tag v1.0.0
git push origin v1.0.0
The release workflow builds binaries for:
- Linux amd64
- Linux arm64
- macOS amd64
- macOS arm64
Artifacts are uploaded to GitHub Releases.
Docker Workflow
Builds and publishes the webhook handler image:
ghcr.io/shivamshashank/cloudinferops-webhook-handler:latest
π¦ Installation Options
Curl Install
curl -sSL https://raw.githubusercontent.com/shivamshashank/CloudInferOps/main/scripts/install.sh | bash
Linux Manual Installation (via Curl)
You can download and install the latest compiled binary manually for Linux:
# 1. Download the latest binary for your architecture (e.g., AMD64 / x86_64)
curl -LO https://github.com/shivamshashank/CloudInferOps/releases/latest/download/cloudinferops-linux-amd64
# 2. Make the binary executable
chmod +x cloudinferops-linux-amd64
# 3. Move it to your local system's bin directory to make it globally available
sudo mv cloudinferops-linux-amd64 /usr/local/bin/cloudinferops
# 4. Verify the installation
cloudinferops version
(For ARM64 processors, replace cloudinferops-linux-amd64 with
cloudinferops-linux-arm64)
Go Install
sudo go install github.com/shivamshashank/CloudInferOps/cmd/cloudinferops@latest
GitHub Releases
Alternatively, you can manually download precompiled binaries for all supported platforms (Linux & macOS) directly from GitHub Releases.
π Running with Sudo / Root Privileges
To install system prerequisites (such as Kubernetes clusters and core networking
configurations) and bind services locally, you can run CloudInferOps fully under
elevated privileges (sudo mode):
sudo cloudinferops deploy observability
sudo cloudinferops status
[!NOTE] CloudInferOps is built with smart environment-aware root fallback. When run as
sudo, the CLI automatically detects the original invoking user ($SUDO_USER) and correctly references their standard home directory paths (such as~/.kube/configand~/.cloudinferops/config.yaml), preventing configuration directory pollution inside the/rootpath.
π§ͺ Local Testing via Multipass (Recommended for macOS Users)
Since native Linux VMs are required for kubeadm, macOS developers can test CloudInferOps locally using a lightweight Multipass Ubuntu VM.
Follow this step-by-step pipeline to run globally inside a local VM:
1. Launch a Multipass VM
Provision an Ubuntu instance meeting minimum system requirements (2 CPUs, 4GB RAM):
multipass launch --name cloudinferops-vm --cpus 2 --memory 4G --disk 20G
2. Move Binary Globally inside the VM
Compile the Linux AMD64 binary locally on your host machine, transfer it to the
VM, and move it to /usr/local/bin to make it globally available:
# Compile for Linux (from host machine)
env GOOS=linux GOARCH=amd64 go build -o cloudinferops cmd/cloudinferops/main.go
# Transfer to Multipass VM
multipass transfer cloudinferops cloudinferops-vm:/home/ubuntu/cloudinferops
# Shell into the VM
multipass shell cloudinferops-vm
# Inside the VM shell: Make it executable and move to global bin path
chmod +x /home/ubuntu/cloudinferops
sudo mv /home/ubuntu/cloudinferops /usr/local/bin/cloudinferops
3. Verify Global Run
Now you can execute the cloudinferops CLI globally from anywhere in the VM
shell (just like standard system commands):
sudo cloudinferops doctor
4. Deploy Observability Stack
sudo cloudinferops deploy observability
When prompt options appear, select 1 to automatically install kubeadm or run
directly on an existing cluster.
5. Access Dashboards from Host Browser
Once fully deployed, retrieve the service status:
sudo cloudinferops status
CloudInferOps will automatically resolve the active VM interface IP. Simply open
the generated links (e.g. http://<VM_IP>/grafana) directly in your host
machine's web browser!
π§Ή Uninstall
Remove observability stack:
sudo cloudinferops uninstall observability
Remove everything managed by CloudInferOps:
sudo cloudinferops uninstall all
πΈ Screenshots
| CloudInferOps Status | ArgoCD | Prometheus |
|---|---|---|
![]() |
![]() |
![]() |
| Grafana | Node Exporter | Alertmanager |
![]() |
![]() |
![]() |
ποΈ Repository Structure
CloudInferOps/
βββ cmd/
β βββ cloudinferops/
βββ internal/
β βββ alerts/
β βββ cli/
β βββ config/
β βββ doctor/
β βββ gitops/
β βββ helm/
β βββ installer/
β βββ kubernetes/
β βββ observability/
β βββ utils/
β βββ webhook/
βββ charts/
β βββ webhook-handler/
βββ configs/
βββ dashboards/
βββ docs/
βββ scripts/
β βββ install.sh
βββ .github/
β βββ workflows/
βββ Dockerfile.webhook
βββ go.mod
βββ go.sum
βββ README.md
βββ ROADMAP.md
βββ LICENSE
π οΈ Built With
- Go
- Cobra
- Viper
- Kubernetes
- Helm
- Prometheus
- Grafana
- Loki
- Tempo
- OpenTelemetry
- Alertmanager
- GitHub Actions
π€ Contributing
Contributions are welcome.
sudo git clone https://github.com/shivamshashank/CloudInferOps.git
cd CloudInferOps
sudo go mod tidy
sudo go test ./...
Create a branch:
git checkout -b feature/my-feature
Commit and push:
git commit -m "feat: add my feature"
git push origin feature/my-feature
Open a pull request.
π License
This project is licensed under the MIT License.
π€ Author
Shivam Shashank
- π Portfolio: shivam-shashank.me
- πΌ LinkedIn: shivam-shashank-2b5766217
- π§ Email: shivamkumar872000@gmail.com
- π GitHub: shivamshashank





