Role
创建Role
apply yaml
-
kubectl create role namex —verb=get,watch,list --resource=pods --dry-run=client -o yaml>role1.yaml
- 快速获取role1.yaml,再进行修改
-
kubectl apply -f role1.yaml
kubectl create role namex —verb=get,watch,list --resource=pods,deployment
查看Role
kubectl get role
1 | NAME AGE |