Kubernetes izinleri
not
Başlıklar ve tablolar Türkçe; açıklamalar koddan üretildiği için İngilizce.
OpenConsole her cluster'a Yönetim → Cluster'lar ekranında verdiğiniz kimlikle bağlanır; bu normalde deploy/rbac.yaml dosyasındaki ServiceAccount'tur. O ClusterRole tavandır: OpenConsole rolleri ne verirse versin, kullanıcı bir cluster'da onun izin verdiğinden fazlasını yapamaz. Karşılık gelen izni hiç vermeyecekseniz kuralı silin. Yalnız bakabilen bir konsol için onun yerine deploy/rbac-readonly.yaml uygulayın (nesne adları aynı, biri diğerinin yerine geçer).
Tam (deploy/rbac.yaml)
| API grubu | Kaynaklar | İşlem türleri | Ne için |
|---|---|---|---|
| core | namespaces, pods, services, configmaps, events | get, list, watch | Reads for every Dashboard tab + events for the Live Events panel. |
| core | secrets | get, list, update | Secrets tab: get / list for secrets:list / get / reveal, update for secrets:edit (YAML editor). No watch: secrets are read on demand, never cached. Drop update if you won't grant secrets:edit, or the whole rule if you won't grant any secrets permission. |
| core | pods/log | get | Pod logs (pods:logs). |
| core | pods/exec | create | Pod shell (pods:exec). |
| core | pods, services, configmaps | update | YAML apply ({resource}:edit) on core resources. |
| apps | deployments, daemonsets, statefulsets | get, list, watch, update | Deployments, DaemonSets and StatefulSets tabs; update for YAML apply. |
| apps | replicasets | get, list | Deployment revisions in the detail view (read only, no rollback). |
| metrics.k8s.io | pods, nodes | get, list | Pod CPU / memory (metrics-server), sampled every 30 s; node usage for Overview and Nodes. |
| core | nodes | get, list, watch | Admin → Overview (node strip) and Nodes. watch keeps nodes in the informer cache; without it OpenConsole lists them on each request. |
| core | services/proxy (yalnız monitoring-kube-prometheus-prometheus:9090) | get | Verilmez (dosyada yorum satırı). Optional: Prometheus "in the cluster (API server proxy)" mode (Admin → Clusters → Prometheus). Off by default: services/proxy lets the token send GET requests to the Service, so name only your Prometheus Service. |
| apps | deployments | patch | Deployment restart (deployments:restart) patches the pod template. |
| apps | deployments/scale, statefulsets/scale | get, update | Scale (deployments:scale, statefulsets:scale). |
| autoscaling | horizontalpodautoscalers | get, list, watch, update | HPA tab (autoscaling/v2); update for YAML apply (hpas:edit). |
| networking.k8s.io | ingresses | get, list, watch, update | Ingresses tab; update for YAML apply (ingresses:edit). |
| batch | cronjobs, jobs | get, list, watch, update | CronJobs and Jobs tabs; update for YAML apply (cronjobs:edit, jobs:edit). |
Salt okuma (deploy/rbac-readonly.yaml)
| API grubu | Kaynaklar | İşlem türleri | Ne için |
|---|---|---|---|
| core | namespaces, pods, services, configmaps, events | get, list, watch | Reads for every Dashboard tab + events for the Live Events panel. |
| core | pods/log | get | Pod / deployment / job logs. Logs can contain sensitive data too — drop this rule if read-only should mean "no logs" as well. |
| core | secrets | get, list | Verilmez (dosyada yorum satırı). Secrets: deliberately omitted. Note that get on secrets lets the ServiceAccount read values, so enabling it is not "metadata only" at the Kubernetes level — OpenConsole's secrets:reveal permission is then the only thing keeping values hidden from users. |
| apps | deployments, daemonsets, statefulsets | get, list, watch | Deployments, DaemonSets and StatefulSets tabs. |
| apps | replicasets | get, list | Deployment revisions in the detail view (read only, no rollback). |
| metrics.k8s.io | pods, nodes | get, list | Pod CPU / memory (metrics-server), sampled every 30 s; node usage for Overview and Nodes. |
| core | nodes | get, list, watch | Admin → Overview (node strip) and Nodes. watch keeps nodes in the informer cache; without it OpenConsole lists them on each request. |
| core | services/proxy (yalnız monitoring-kube-prometheus-prometheus:9090) | get | Verilmez (dosyada yorum satırı). Optional: Prometheus "in the cluster (API server proxy)" mode (Admin → Clusters → Prometheus). Off by default: services/proxy lets the token send GET requests to the Service, so name only your Prometheus Service. |
| autoscaling | horizontalpodautoscalers | get, list, watch | HPA tab (autoscaling/v2). |
| networking.k8s.io | ingresses | get, list, watch | Ingresses tab. |
| batch | cronjobs, jobs | get, list, watch | CronJobs and Jobs tabs. |