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 askubectl 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.
Looking around
Lists and details needlist 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 needslist 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
createonpods/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.
An example
A teammate with the built-inview 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.