Enable the usage of headlamp in OpenShift » Historie » Zyklus 1
Peter Pfläging, 17.06.2025 16:16
| 1 | 1 | Peter Pfläging | # Enable the usage of headlamp in OpenShift |
|---|---|---|---|
| 2 | |||
| 3 | If you want to use [Headlamp](https://headlamp.dev) as GUI App in OpenShift, you have to enable Namespace List in your Cluster or work as cluster-admin the whole time (no good idea :-(). |
||
| 4 | |||
| 5 | So assuming your Headlamp users are "Power Users": |
||
| 6 | |||
| 7 | ```yaml |
||
| 8 | --- |
||
| 9 | kind: ClusterRole |
||
| 10 | apiVersion: rbac.authorization.k8s.io/v1 |
||
| 11 | metadata: |
||
| 12 | name: list-namespaces |
||
| 13 | rules: |
||
| 14 | - verbs: |
||
| 15 | - list |
||
| 16 | apiGroups: |
||
| 17 | - '' |
||
| 18 | resources: |
||
| 19 | - namespaces |
||
| 20 | --- |
||
| 21 | kind: ClusterRoleBinding |
||
| 22 | apiVersion: rbac.authorization.k8s.io/v1 |
||
| 23 | metadata: |
||
| 24 | name: power-users-use-headlamp |
||
| 25 | subjects: |
||
| 26 | - kind: Group |
||
| 27 | apiGroup: rbac.authorization.k8s.io |
||
| 28 | name: power-users |
||
| 29 | roleRef: |
||
| 30 | apiGroup: rbac.authorization.k8s.io |
||
| 31 | kind: ClusterRole |
||
| 32 | name: list-namespaces |
||
| 33 | --- |
||
| 34 | ``` |
||
| 35 | |||
| 36 | And yes you know you have to create a power-users group and put your users in: |
||
| 37 | |||
| 38 | ```yaml |
||
| 39 | kind: Group |
||
| 40 | apiVersion: user.openshift.io/v1 |
||
| 41 | metadata: |
||
| 42 | name: power-users |
||
| 43 | users: |
||
| 44 | - peter |
||
| 45 | - nils |
||
| 46 | ``` |
||
| 47 | |||
| 48 | Now you can see all namespaces in Headlamp. So it's better working as power user ;-) |