System overview

kube-res-foresight connects collection, forecasting, recommendations, and controlled actions for one Kubernetes cluster. Follow blue data relationships to see how advice is produced, then green control relationships to see where it is applied.

System overview
100%Open SVG ↗
System overviewMetrics, the platform, advice, execution, and observed feedback.Platform · forecasting and decisionsManagement consoleSettings · advice · effect reportsAI analysisQueries · skills · scheduled reportsPrometheusHistory and current metricsGrafanaOptional visualizationCollection and data qualityQueries · units · grids · gapsForecasting and evaluationMethods · backtests · scoresDecisions and safeguardsLead time · consensus · bounds · fallbackRecommendation snapshotResources · replicas · version · expiryTime-series serviceOptional model inferenceOperatorScale API · replicasKyverno admissionResources for new PodsRelational databaseSQLite / MySQL / PostgreSQL · choose oneKubernetesWorkloads and PodsPersistent recordsPod settingsObserved metrics and Ready state feed backBlue: data Green: cluster writes Dashed: optional
Arrows represent data or control relationships. Zoom and scroll, or save the original SVG.

Prometheus scrapes workload and cluster metrics. The platform actively queries its HTTP API for history and recent samples. Metric arrows represent data relationships, not direct pushes from applications. Observed usage and Ready replicas return to collection and evaluation.

Dashed relationships are optional: time-series services produce numerical forecasts, while the AI assistant provides querying and analysis. Boxes represent responsibilities, not necessarily separate deployments.

Modules and responsibilities

Functional modules
100%Open SVG ↗
Functional modulesConfiguration, forecasting, jobs, interfaces, and shared storage.Management consoleModules · sources · methods · AI configuration · auditPlatform · shared services and access controlModules and metricsWorkload · history · schedule · boundsForecasting and evaluationRuns · backtests · actuals · rankingsAdvice and executionSnapshots · admission · replicasTask centerSchedules · jobs · retries · retentionAI assistant and reportsData tools · skills · email tasksAdministration and auditUsers · LDAP · roles · action recordsShared relational databaseSettings · history · jobs · advice · auditOptional model connectionsTime-series models forecast · LLMs analyze
Arrows represent data or control relationships. Zoom and scroll, or save the original SVG.
ModuleInputs and responsibilitiesOutputs
Module and metric configurationOne workload per module, with metric sources, units, history, prediction mode, bounds, and authorization.Collection and runtime policy for that workload.
Collection and qualityRender queries, read in segments, and check sampling, gaps, units, and freshness.History on a consistent grid with quality information.
Forecasting and evaluationRun selected methods, compare baselines in rolling backtests, and evaluate predictions when actuals arrive.Forecasts, versions, eligibility, and performance records.
Decisions and safeguardsCombine lead time, consensus, capacity inputs, schedules, OOM/heap pressure, and bounds.Resource specifications, target replicas, and reasons.
Advice and execution interfacesStore versioned, expiring snapshots and expose resource advice and replica decisions separately.Traceable advice and inputs for execution.
Task centerSchedule forecasting, backtests, evaluations, retention, and AI tasks, with failure and retry records.Scheduled jobs and run history.
Administration and auditManage users, LDAP, permissions, connections, and settings; inspect actions, admissions, and degradation.Managed configuration and operation history.

The console manages these capabilities through Platform APIs. Platform and task entry points share business rules and a database and can be combined according to deployment needs. Logical modules do not require separate services.

Two independent execution paths

Resource and replica execution
100%Open SVG ↗
Resource and replica executionAdmission configures new Pods; the Operator separately controls replicas.Validated snapshotFreshness · version · authorizationPath 1 · resources of new PodsPath 2 · workload replicasPod creation admission requestKubernetes API ServerKyverno queries resource adviceSnapshot only, no model inferenceApply requests / limitsSubject to module policyOperator reads advicePlatform provides target replicasCheck execution rulesBounds · readiness · cooldown · stepWrite replicas through Scale APIOne replica controllerKubernetes outcomesPod resources and Ready capacityInvalid advice preserves resourcesOutages use cache and recovery rulesAuthorize admission and scaling separately; no overlapping writes
Arrows represent data or control relationships. Zoom and scroll, or save the original SVG.

New Pod resources: API Server admission invokes Kyverno, whose policy queries validated, unexpired resource advice and applies authorized requests and managed limits. Admission does not wait for collection, inference, or long queries. Unavailable advice preserves original resources.

Workload replicas: the Operator reads modules and decisions from the platform, checks bounds, readiness, cooldown, and step limits, then writes replicas through the Kubernetes Scale API. It neither reads the platform database nor changes Pod requests/limits.

Authorize the paths separately. Only one controller may write a workload's replicas; the Operator and HPA/KEDA cannot control the same target simultaneously. Updated recommendations do not immediately resize running Pods.

Storage and external dependencies

ComponentPurpose and boundary
PrometheusSupplies workload and cluster metrics. The platform queries it without replacing the metric store.
Relational databaseChoose SQLite, MySQL, or PostgreSQL to retain settings, collected data, jobs, predictions, recommendations, and audits.
Time-series service, optionalProvides external forecasts and, where supported, background tuning. Failures follow candidate and fallback rules.
LLM and email, optionalThe assistant queries records; scheduled tasks generate and email answers without directly writing resource or replica changes.
Kubernetes APIHandles admission and replica changes. Permissions, workload state, and readiness affect actual outcomes.

Feedback and observability

Platform and Operator expose Prometheus metrics for monitoring, including with Grafana. Management views relate forecasts, advice, reported actions, admissions, and measured effectiveness. Execution does not wait for Prometheus to scrape decisions and read them back.