Ana içeriğe geç

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 grubuKaynaklarİşlem türleriNe için
corenamespaces, pods, services, configmaps, eventsget, list, watchReads for every Dashboard tab + events for the Live Events panel.
coresecretsget, list, updateSecrets 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.
corepods/loggetPod logs (pods:logs).
corepods/execcreatePod shell (pods:exec).
corepods, services, configmapsupdateYAML apply ({resource}:edit) on core resources.
appsdeployments, daemonsets, statefulsetsget, list, watch, updateDeployments, DaemonSets and StatefulSets tabs; update for YAML apply.
appsreplicasetsget, listDeployment revisions in the detail view (read only, no rollback).
metrics.k8s.iopods, nodesget, listPod CPU / memory (metrics-server), sampled every 30 s; node usage for Overview and Nodes.
corenodesget, list, watchAdmin → Overview (node strip) and Nodes. watch keeps nodes in the informer cache; without it OpenConsole lists them on each request.
coreservices/proxy (yalnız monitoring-kube-prometheus-prometheus:9090)getVerilmez (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.
appsdeploymentspatchDeployment restart (deployments:restart) patches the pod template.
appsdeployments/scale, statefulsets/scaleget, updateScale (deployments:scale, statefulsets:scale).
autoscalinghorizontalpodautoscalersget, list, watch, updateHPA tab (autoscaling/v2); update for YAML apply (hpas:edit).
networking.k8s.ioingressesget, list, watch, updateIngresses tab; update for YAML apply (ingresses:edit).
batchcronjobs, jobsget, list, watch, updateCronJobs and Jobs tabs; update for YAML apply (cronjobs:edit, jobs:edit).

Salt okuma (deploy/rbac-readonly.yaml)​

API grubuKaynaklarİşlem türleriNe için
corenamespaces, pods, services, configmaps, eventsget, list, watchReads for every Dashboard tab + events for the Live Events panel.
corepods/loggetPod / deployment / job logs. Logs can contain sensitive data too — drop this rule if read-only should mean "no logs" as well.
coresecretsget, listVerilmez (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.
appsdeployments, daemonsets, statefulsetsget, list, watchDeployments, DaemonSets and StatefulSets tabs.
appsreplicasetsget, listDeployment revisions in the detail view (read only, no rollback).
metrics.k8s.iopods, nodesget, listPod CPU / memory (metrics-server), sampled every 30 s; node usage for Overview and Nodes.
corenodesget, list, watchAdmin → Overview (node strip) and Nodes. watch keeps nodes in the informer cache; without it OpenConsole lists them on each request.
coreservices/proxy (yalnız monitoring-kube-prometheus-prometheus:9090)getVerilmez (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.
autoscalinghorizontalpodautoscalersget, list, watchHPA tab (autoscaling/v2).
networking.k8s.ioingressesget, list, watchIngresses tab.
batchcronjobs, jobsget, list, watchCronJobs and Jobs tabs.