# Access Control

> Manage Kubernetes API access using Role-Based Access Control (RBAC)

- **Category**: Cloud
- **Subcategory**: Security
- **Canonical URL**: https://designpattern.fyi/patterns/k8s_access_control/

---

## Description
The Access Control pattern uses Kubernetes RBAC to manage access to the Kubernetes API server. RBAC defines roles with permissions and role bindings that associate roles with users or service accounts. This implements the principle of least privilege for Kubernetes operations and enables audit trails for access decisions.


## Use Cases
Use when you need to control access to Kubernetes resources or when you want to implement the principle of least privilege for cluster operations.





## Trade-offs


### Advantages

- Fine-grained access control

- Principle of least privilege

- Audit trail for access

- Standard Kubernetes mechanism




### Considerations & Drawbacks

- Complex to configure correctly

- Requires RBAC knowledge

- Over-permissive roles can be dangerous







---
**Reference**: [Original Source](https://github.com/k8spatterns/examples/tree/master/security/AccessControl)

