Longhorn Operator
You deploy the longhorn operator to manage persistent block storage inside Kubernetes clusters. It automates volume creation, data copies, and backups across all your worker nodes. Most teams set up this tool using cluster admin roles during initial tests. Broad roles let any user or script delete live storage volumes by mistake. How the longhorn operator works in Kubernetes The longhorn operator runs as a set of pods in its own namespace. It watches custom storage resources and turns them in
External Secrets Operator (K8s): the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You deploy the longhorn operator to manage persistent block storage inside Kubernetes clusters. It automates volume creation, data copies, and backups across all your worker nodes. Most teams set up this tool using cluster admin roles during initial tests. Broad roles let any user or script delete live storage volumes by mistake.
How the longhorn operator works in Kubernetes
The longhorn operator runs as a set of pods in its own namespace. It watches custom storage resources and turns them into block devices on nodes. When an app asks for storage, the manager builds an engine and replicas. Each replica holds a copy of your data on a separate node disk.
If one node goes down, the system switches to a healthy data copy. The manager also runs a web dashboard and background jobs for snapshots. Teams use native Kubernetes role rules to control who can edit these resources. You bind service accounts and user groups to specific storage roles in Kubernetes.
A read role lets engineers view volume health without changing any disk settings. An admin role lets operators create backups, upgrade engines, and delete old volumes. These role rules keep regular app pods from changing cluster storage settings.
What native storage roles solve and what they miss
Native cluster roles solve the basic problem of who can reach the API. They stop random users from viewing or changing storage objects in the cluster. You can separate app teams by giving them access to specific namespaces only. Still, on-call engineers still need write roles to fix broken volumes during outages.
Once an engineer logs in with a write role, the cluster trusts everything. Native roles check who starts a session, not what individual commands do live. An engineer with valid rights can run a delete command on production disks. They can also attach a live volume to a test pod and read files.
External Secrets Operator (K8s): architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Standard Kubernetes logs only show that an API call hit the storage endpoint. They do not stop bad commands in flight or mask sensitive fields. If a volume holds customer emails or card numbers, engineers can read them. Teams need a way to inspect every command and approve risky actions live.
Best practices for day-two volume operations
Start by removing cluster admin rights from daily human accounts and automation scripts. Give your team read-only roles for everyday checks on volume health and disk space. Set up separate roles for backup jobs so they cannot delete active volumes. Keep your storage nodes on dedicated disks to avoid fights for drive speed.
Test your volume backups often by restoring them into a clean test namespace. Monitor disk space on every node so replicas do not run out of room. When engineers must fix a stuck volume, require peer approval for that task. Log every command sent to the cluster API during a storage fix session.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
What does the longhorn operator do in a cluster?
It turns local disks on your Kubernetes nodes into shared block storage volumes. It manages data copies, snapshots, and backups so stateful apps do not lose data.
How do I restrict access to storage volumes?
You create Kubernetes role bindings that limit who can view or edit storage objects. Give read roles to most developers and keep write roles for storage admins.
Why are Kubernetes roles not enough for storage security?
Kubernetes roles only check permissions when a user starts a request or session. They cannot require approval for one risky command or rewrite sensitive data fields.
Related guides
In this post