添加 robot/in.md

This commit is contained in:
2025-12-17 16:24:13 +08:00
parent 4af615fda1
commit 421fa706f3

17
robot/in.md Normal file
View File

@@ -0,0 +1,17 @@
### 测试是否有创建权限用户sit-robot对tpex-sitlocal-robot命名是否有创建权限 输出yes
```
# kubectl auth can-i create deployments --as=system:serviceaccount:tpex-sitlocal-robot:sit-robot -n tpex-sitlocal-robot
yes
# kubectl auth can-i create pods --as=system:serviceaccount:tpex-sitlocal-robot:sit-robot -n tpex-sitlocal-robot
yes
```
### 查看是否有删除权限
```
# kubectl auth can-i delete pods --as=system:serviceaccount:tpex-sitlocal-robot:sit-robot -n tpex
-sitlocal-robot
yes
# kubectl auth can-i delete deployments --as=system:serviceaccount:tpex-sitlocal-robot:sit-robot
-n tpex-sitlocal-robot
yes
```