EKS Cluster Backup
You run an eks cluster backup by exporting your cluster state and volume snapshots. You also save your Kubernetes API objects to external cloud storage. Most teams set up automated jobs or give engineers admin roles to run exports. Overly broad roles let users read secret keys or change live apps by mistake. How an eks cluster backup works with native roles A complete eks cluster backup captures two main parts of your system. First, it saves the Kubernetes API objects that define your apps an
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.
You run an eks cluster backup by exporting your cluster state and volume snapshots. You also save your Kubernetes API objects to external cloud storage. Most teams set up automated jobs or give engineers admin roles to run exports. Overly broad roles let users read secret keys or change live apps by mistake.
How an eks cluster backup works with native roles
A complete eks cluster backup captures two main parts of your system. First, it saves the Kubernetes API objects that define your apps and rules. Second, it takes snapshots of the storage volumes attached to your running pods. Whatever tool or person runs the backup must talk to the API server.
Kubernetes controls this API access through its native role system, called RBAC. In RBAC, a Role or ClusterRole holds rules that list allowed actions. These permissions are purely additive, which means there are no deny rules at all. A Role always sets permissions inside one single namespace.
By contrast, a ClusterRole is not tied to a single namespace. It can cover cluster-scoped resources like nodes or namespaced resources across all namespaces. To grant these permissions, you create a RoleBinding or a ClusterRoleBinding. A RoleBinding grants access inside one namespace, while a ClusterRoleBinding grants access cluster-wide.
Full cluster backups need to read objects across every namespace in the cluster. Because of this, teams often attach a ClusterRoleBinding to the backup user or service. That role usually grants read access to deployments, services, config maps, and secrets.
Why native roles leave gaps during backup and restore
Native Kubernetes roles solve the basic problem of who can call the API. They let you separate namespace admins from cluster-wide backup operators. When an automated tool runs on a schedule, a read-only ClusterRole works well. The gap appears when human engineers need access to fix a failed backup.
During a recovery check, an engineer often needs to inspect live pods or logs. In Kubernetes RBAC, logs and pod shell access are treated as subresources. RBAC refers to resources by the same name that appears in the API URL. Subresources use a slash in the rule name, such as pods and log.
EKS Access Management + Backup Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Giving an engineer a static role for backup checks grants standing access to secrets. If they can read all objects for an eks cluster backup, they see keys. Native RBAC only checks if a user can run a verb on a resource. It does not inspect what happens inside a live pod shell session.
It also cannot mask sensitive fields like emails, phone numbers, or card numbers. If an engineer dumps a database volume during a manual backup, raw data appears. Native roles decide who logs in, not what individual commands do in flight. Teams also struggle to revoke temporary ClusterRoleBindings after a restore test finishes.
Scoping permissions for safer recovery workflows
To reduce risk, start by splitting automated backup roles from human recovery roles. Automated backup services should only get read verbs on the objects they must export. Do not give human engineers standing cluster-wide read access to secret objects. Instead, use RoleBindings inside one namespace when a team only restores one app.
Remember that RBAC rules are purely additive, so you cannot add a deny rule. If a user gets a wide ClusterRoleBinding, you cannot block one secret namespace. Keep base roles small and require approval before anyone runs manual recovery commands. You should also review your active bindings every week to remove leftover permissions.
Add request guardrails and response masking beside Kubernetes
Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev runs beside the API server as a sidecar for your Kubernetes API and checks every request and response alongside RBAC.
With hoop.dev Kubernetes controls, guardrails can allow listing Secret names while refusing reads of Secret data before execution. Data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.
Frequently asked questions
What is the difference between a Role and a ClusterRole for backups?
A Role sets permissions inside one namespace for single app backups. A ClusterRole covers cluster-wide resources and namespaced objects across all namespaces.
Can I use a deny rule to hide secrets during an eks cluster backup?
No, Kubernetes RBAC permissions are purely additive and have no deny rules. If a role grants secret read access, you cannot block specific secrets with RBAC.
How does Kubernetes control access to pod logs during a restore check?
Kubernetes treats pod logs as a subresource in the RBAC API rule list. You must grant permissions on the specific subresource name rather than just the pod.
Related guides
In this post