Awesome-omni-skill rust-cloud-native

Use when building cloud-native apps, microservices, or Kubernetes-deployed Rust services. Covers Docker, container builds, Dockerfile, multi-stage build, health endpoint, readiness and liveness probes, prometheus metrics, distributed tracing with OpenTelemetry and jaeger, graceful shutdown, 12-factor config, gRPC with tonic, and container optimization.

install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/devops/rust-cloud-native" ~/.claude/skills/diegosouzapw-awesome-omni-skill-rust-cloud-native && rm -rf "$T"
manifest: skills/devops/rust-cloud-native/SKILL.md
source content

Cloud-Native Development

Domain Constraints

Domain RuleDesign ConstraintRust Implication
12-FactorConfig from envEnvironment-based config
ObservabilityMetrics + tracestracing + opentelemetry
Health checksLiveness/readinessDedicated endpoints
Graceful shutdownClean terminationSignal handling
Horizontal scaleStateless designNo local state
Container-friendlySmall binariesRelease optimization

Critical Rules

  • No local persistent state — pods can be killed/rescheduled anytime. Use external state (Redis, DB).
  • Handle SIGTERM, drain connections — zero-downtime deployments require graceful shutdown.
  • Every request must be traceable — distributed systems need tracing spans + opentelemetry export.

Key Crates

PurposeCrate
gRPCtonic
Kuberneteskube, kube-runtime
Dockerbollard
Tracingtracing, opentelemetry
Metricsprometheus, metrics
Configconfig, figment

Graceful Shutdown Pattern

use tokio::signal;

async fn run_server() -> anyhow::Result<()> {
    let app = Router::new()
        .route("/health", get(health))
        .route("/ready", get(ready));

    let addr = SocketAddr::from(([0, 0, 0, 0], 8080));

    axum::Server::bind(&addr)
        .serve(app.into_make_service())
        .with_graceful_shutdown(shutdown_signal())
        .await?;

    Ok(())
}

async fn shutdown_signal() {
    signal::ctrl_c().await.expect("failed to listen for ctrl+c");
    tracing::info!("shutdown signal received");
}

Health Check Pattern

async fn health() -> StatusCode {
    StatusCode::OK
}

async fn ready(State(db): State<Arc<DbPool>>) -> StatusCode {
    match db.ping().await {
        Ok(_) => StatusCode::OK,
        Err(_) => StatusCode::SERVICE_UNAVAILABLE,
    }
}

Common Mistakes

MistakeDomain ViolationFix
Local file stateNot statelessExternal storage
No SIGTERM handlingHard killsGraceful shutdown
No tracingCan't debugtracing spans
Static configNot 12-factorEnv vars