Korab CenajEngineering case studyAll case studies

Public engineering project · v0.1.0 local suite and GitHub Actions verified 23–24 July 2026

Kubernetes Operations Audit

A typed, read-only Python CLI that audits Kubernetes workload, storage, networking, GitOps, and security signals and renders terminal, Markdown, HTML, and JSON reports.

Project type
Infrastructure Tool
Domain
Reliability and operations
Language
Python
Status
Validated

Executive summary

Operational problem

A growing Kubernetes environment needs a repeatable health review that separates operational issues from inventory, tolerates missing optional APIs, and never exposes Secret values.

Implemented solution

The official Kubernetes Python client feeds fault-isolated checks for cluster, workload, storage, networking, GitOps, and security signals. Pydantic models keep Rich terminal, Jinja2 Markdown and HTML, and JSON output aligned.

Outcome

An operator can run one read-only scan, inspect a concise terminal result, and publish a sanitized report without converting unavailable integrations into a misleading clean state.

Technical and operational context

The implementation combines Python packaging, typed models, Kubernetes API integration, fault isolation, report rendering, mocked tests, and strict static-analysis configuration in a compact operator tool.

Architecture

A small Kubernetes client adapter supplies isolated checks. Typed findings feed terminal, Markdown, HTML, and JSON renderers; configuration or API failures become explicit report findings.

  1. Kubernetes API
  2. Read-only client
  3. Isolated checks
  4. Typed findings
  5. Terminal output
  6. Markdown / HTML / JSON reports

Implementation

The official Kubernetes Python client feeds fault-isolated checks for cluster, workload, storage, networking, GitOps, and security signals. Pydantic models keep Rich terminal, Jinja2 Markdown and HTML, and JSON output aligned.

Key decisions and trade-offs

Typed reports instead of terminal-only output

Pydantic models keep terminal, Markdown, HTML, and JSON output consistent. Report comparison remains future work in the reviewed local version.

Fault isolation instead of fail-fast optional checks

Missing optional namespaces and CRDs become warnings while core inspection continues, keeping partial coverage visible.

Read-only inspection by design

The client uses Kubernetes read APIs and reports Secret counts only, reducing the consequences of running an audit during troubleshooting.

Security, reliability, and observability

Read-only collection

The client inspects cluster state and has no mutation command.

Fault-isolated checks

A failed optional integration becomes a warning while the remaining checks continue.

Sanitized publication

Example reports omit private cluster identifiers and Secret values; raw local reports remain excluded from publication.

Infrastructure concepts demonstrated

Published evidence

Local quality-gate record

Sanitized live output
package version: 0.1.0
pytest: 16 passed
Ruff lint: passed
Ruff format: 37 files formatted
mypy: no issues in 30 source files
report formats: terminal, Markdown, HTML, JSON
mutation commands: none

Validation

Checks shown here are project-specific; no portfolio-wide claim is applied automatically.

Evidence and links

Links are limited to public-safe source material and sanitized evidence. Credentials, state, plans, identifiers, private topology, and backup contents are intentionally excluded.

Lessons learned

Limitations

  • The tool reports Kubernetes and supported optional API state; it cannot infer external systems absent from those APIs.
  • A hygiene finding is not necessarily an active incident and still requires operator context.
  • Historical report comparison and scheduled recurring audits are not implemented in the reviewed local version.

Next improvement

Implement a versioned report-comparison command before making any historical-drift or CI-gate claim.