添加 robot/in.md
This commit is contained in:
17
robot/in.md
Normal file
17
robot/in.md
Normal 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
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user