

GitHub - mhausenblas/rback: RBAC in Kubernetes visualizer
source link: https://github.com/mhausenblas/rback
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
rback
A simple "RBAC in Kubernetes" visualizer. No matter how complex the setup, rback
queries all RBAC related information of an Kubernetes cluster in constant time and generates a graph representation of service accounts, (cluster) roles, and the respective access rules in dot format.
For example, here is an Amazon EKS cluster as seen by rback
:
Another example would be a local K3S cluster:
Install
rback
depends on you having access to a Kubernetes cluster, either in the cloud (like Amazon EKS)
or locally (k3s, kind, Minikube, Docker for Desktop) as well as kubectl
installed and configured, locally.
To install it for macOS, do:
$ curl -sL https://github.com/mhausenblas/rback/releases/download/v0.1.0/macos_rback -o rback
$ chmod +x rback && sudo mv rback /usr/local/bin
To install it for Linux, do:
$ curl -sL https://github.com/mhausenblas/rback/releases/download/v0.1.0/linux_rback -o rback
$ chmod +x rback && sudo mv rback /usr/local/bin
You can also build it from source, with Go 1.12 like so:
$ git clone https://github.com/mhausenblas/rback.git && cd rback $ go build
Usage
Run rback
locally against the target cluster and store its output in a .dot
file like shown in the following:
$ rback > result.dot
Now that you have result.dot
, you can render the graph either online or locally.
Render online
There are plenty of Graphviz (dot
) online visualization tools available, for example, use magjac.com/graphviz-visual-editor/ for interaction or the simpler dreampuf.github.io/GraphvizOnline. Head over there and paste the output of rback
into it.
Render locally
Install Graphviz, for example, on macOS you can do brew install graphviz
. Then you can do the following (on macOS):
$ rback | dot -Tpng > /tmp/rback.png && open /tmp/rback.png
Background
How it works is that rback
issues the following five queries by shelling out to kubectl
:
kubectl get sa --all-namespaces --output json kubectl get roles --all-namespaces --output json kubectl get rolebindings --all-namespaces --output json kubectl get clusterroles --output json kubectl get clusterrolebindings --output json
Then, based on this information, the graphs are created using the github.com/emicklei/dot package.
Recommend
-
37
-
35
README.md A simple Kubernetes load testing tool
-
38
RBAC RBAC(Role Based Access Control 基于角色的访问控制) 是安全领域一种授权(Authorization)机制。权限被授予给角色,角色又被赋予给主体。
-
12
Kubernetes RBAC 详解 深入理解 Kubernetes RBAC 的用法 发表于 June 22, 2018 China 前面两节课我们学习了Kubernetes中的两个用于配置信息的重要...
-
22
Permission manager : RBAC management for KubernetesPermission manager : RBAC management for Kubernetes
-
15
为什么 RBAC 不足以保障 Kubernetes 的安全? 所有旧有的安全和合规规则和法规都需要以某种方式加装到 Kubernetes 上。不幸的是,像 RBAC 这样的旧的访问控制工具根本无法应对挑战。
-
11
How To Access Kubernetes Dashboard On RBAC Enabled Azure Kubernetes June 9,2020 // Kubernetes...
-
16
master tride/test/people.csv...
-
6
master tride/test/group-map.json
-
7
Azure Kubernetes Service – Azure RBAC for Kubernetes authorization At this year’s Ignite conference Microsoft announced the next major step of integrating Azure functionality into AKS: Azure RBAC for Kubernetes authorization.-...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK