cloud-demo/apps/headlamp/rbac.yaml
CodeGit 4ea6d8b9e5
Some checks failed
terraform / validate (push) Failing after 37s
Updated project to improve guidance
2026-09-03 19:06:27 +01:00

32 lines
893 B
YAML

# Cluster-admin ServiceAccount + long-lived token, used both to log in to
# Headlamp (docs/03-flux.md step 5) and as the client identity for
# direct LAN kubectl access if you'd rather not manage the SSH-fetched
# kubeconfig from step 6. Fine for a single-user homelab; split into
# narrower-scoped accounts if more people get access later.
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: headlamp
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: headlamp
---
apiVersion: v1
kind: Secret
metadata:
name: admin-user-token
namespace: headlamp
annotations:
kubernetes.io/service-account.name: admin-user
type: kubernetes.io/service-account-token