Skip to main content
KubeStacks acts with your credentials: the ones in your kubeconfig on the desktop, or the identity you signed in with when it runs in your cluster. It never has more access than you do, and it doesn’t need cluster-admin. An account that can only read a few namespaces works fine.

Asked up front

Before it offers a change, KubeStacks asks the cluster whether you’re allowed to make it, with a SelfSubjectAccessReview per action (the same check as kubectl auth can-i). Kubernetes lets every signed-in account make these checks.
  • An action you can’t take stays visible, but disabled, and says why: Your account can’t delete pods in shop.
  • If the cluster can’t say, the action stays available and the API server has the final word.
  • Answers are kept for five minutes.
A cluster you made read-only disables every change regardless, with Changes are turned off for this cluster.

Looking around

Lists and details need list and get on the kinds you look at. KubeStacks refreshes lists by asking again every few seconds (less often for long lists), so it doesn’t need watch. If a page needs something you can’t read, it says Access denied, with Your account isn’t allowed to read this. If you only have access to some namespaces, pick one from the namespace menu.

Usage history

Charts over time come from a Prometheus-compatible server, reached through the API server’s service proxy with your own credentials. Without list on services, choose the server yourself in Metrics source. See Usage history.

Helm releases

KubeStacks reads releases from the Secrets (or ConfigMaps) Helm keeps them in, so looking at them needs list on secrets in their namespaces (or on configmaps, for releases kept there), and no helm. The built-in view ClusterRole doesn’t include Secrets, so it isn’t enough to see releases. Changing a release runs your own helm with your credentials, so you need whatever Helm needs to change the release’s objects. See Helm releases.

Making changes

Each action checks one permission first: A few notes:
  • Draining cordons the node, then evicts its pods a few at a time, so it also needs create on pods/eviction. A PodDisruptionBudget can refuse an eviction: the drain shows each pod’s progress, with Retry for any that fail.
  • Debug containers open a shell in the new container, which also needs pods/exec.
  • Create from YAML and several at once don’t check first. The cluster checks each object, and the dialog shows what it refused.
To check a permission yourself, use kubectl auth can-i, for example kubectl auth can-i create pods/exec -n shop. KubeStacks asks the cluster the same question.

An example

A teammate with the built-in view role can browse workloads and read logs. To let them see usage history from a Prometheus in monitoring too, bind a Role there:

Changing things safely

The guard rails on every change.

Read-only mode

Turn changes off for a cluster, whatever RBAC allows.