The Simplest Way to Make Fluxcd and Rook Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Using fluxcd and rook together lets teams manage cluster storage through Git commits. Flux reads your storage manifests from Git and tells Rook to build disks. This workflow keeps your storage state and app state in one central repo. Teams do not need to run manual scripts to add new storage pools. Instead, they open a pull request to change disk size or pool rules. Once merged, the cluster updates itself to match the desired Git state. How fluxcd and rook pass roles and data Flux runs insid

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Using fluxcd and rook together lets teams manage cluster storage through Git commits. Flux reads your storage manifests from Git and tells Rook to build disks.

This workflow keeps your storage state and app state in one central repo. Teams do not need to run manual scripts to add new storage pools. Instead, they open a pull request to change disk size or pool rules. Once merged, the cluster updates itself to match the desired Git state.

How fluxcd and rook pass roles and data

Flux runs inside your cluster as a set of small controllers. These controllers watch your Git repo for new commits and changed files. When a change happens, Flux uses its Kubernetes service account to apply it. Rook also runs inside the cluster as a storage operator for Ceph.

Flux does not talk to your raw hard drives or storage nodes. Instead, Flux writes custom storage objects into the Kubernetes API server. Rook watches the API server for those exact storage objects. When Rook sees a new storage request, it sets up the Ceph daemons.

This split keeps your Git controller away from your raw storage data. Flux needs permission to write Rook custom objects into the storage namespace. Rook needs node access to format drives and mount block volumes for apps. Data flows from Git to the API server, and then to Rook.

Common failure modes and how to scope roles

Many teams fail by giving Flux one huge cluster admin role. A shared admin account can wipe out storage pools if a repo breaks. If someone commits a bad delete rule, Flux will remove the Ceph cluster. You should split Flux roles by namespace and by resource type.

Give the storage sync job a role that only writes Rook objects. Block the general app sync jobs from touching the storage namespace at all. Another common bug happens when Flux applies storage objects in the wrong order. Rook needs its base operator running before Flux sends Ceph cluster files.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

If Flux sends both at once, the API server rejects the cluster file. You must set up health checks between your Flux sync stages. Tell Flux to wait until the Rook operator pods are ready and healthy. Only then should Flux apply the storage pools and block volume claims.

Managing upgrades and disk changes safely

Storage updates take much more time than normal stateless app updates. When Rook updates Ceph pods, it moves one disk group at a time. It checks cluster health before moving to the next storage node. If Flux has a short timeout, it will mark the upgrade as failed.

A failed status can block other apps in the dependency chain from updating. You should set longer wait times on the Flux stage that manages Rook. Teams also run into trouble when developers need to check broken storage nodes. People often share one admin kubeconfig file to run debug commands on Rook.

Shared keys leave no audit log of who ran which storage tool. Every person and controller should use their own scoped role for cluster tasks. Network rules should also block normal app pods from reaching Rook admin ports. Only storage nodes and storage pods should talk on the replication network.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

How do we stop Flux from deleting a live Rook storage cluster?

Turn off automatic pruning on the Flux resource that manages your Ceph cluster. Even if someone deletes the file in Git, Flux will leave disks intact.

Why do my Rook storage pools fail on the first Git sync?

Flux likely applied the pool files before Rook finished installing its custom definitions. Split the operator install and the pool setup into two separate Flux stages.

Where should we store Rook dashboard passwords when using GitOps?

Never store plain text keys in your Git repo. Use an external secret tool or encrypted files that Flux decrypts inside the cluster.

The query runs. The emails stay hidden.