Files
other/robot/in.md
2025-12-17 16:24:13 +08:00

18 lines
644 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### 测试是否有创建权限用户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
```