容器编排技术 -- Kubernetes kubectl create rolebinding 命令详解

  • 1 kubectl create rolebinding
  • 2 语法
  • 3 示例
  • 4 Flags

kubectl create rolebinding

为特定Role或ClusterRole创建RoleBinding。

语法

$ rolebinding NAME --clusterrole=NAME|--role=NAME [--user=username] [--group=groupname] [--serviceaccount=namespace:serviceaccountname] [--dry-run]

示例

将admin ClusterRole授予user1,user2和group1。

kubectl create rolebinding admin --clusterrole=admin --user=user1 --user=user2 --group=group1

Flags

Name Shorthand Default Usage
allow-missing-template-keys   true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
clusterrole     ClusterRole this RoleBinding should reference
dry-run   false If true, only print the object that would be sent, without sending it.
generator   rolebinding.rbac.authorization.k8s.io/v1alpha1 The name of the API generator to use.
group   [] groups to bind to the role
no-headers   false When using the default or custom-column output format, don't print headers (default print headers).
output o   Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See custom columns [http://kubernetes.io/docs/user-guide/kubectl-overview/#custom-columns], golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].
output-version     DEPRECATED: To use a specific API version, fully-qualify the resource, version, and group (for example: 'jobs.v1.batch/myjob').
role     Role this RoleBinding should reference
save-config   false If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.
schema-cache-dir   ~/.kube/schema If non-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
serviceaccount   [] service accounts to bind to the role, in the format :
show-all a false When printing, show all resources (default hide terminated pods.)
show-labels   false When printing, show all labels as the last column (default hide labels column)
sort-by     If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
template     Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
user   [] usernames to bind to the role
validate   true If true, use a schema to validate the input before sending it

容器编排技术 -- Kubernetes kubectl create rolebinding 命令详解相关推荐

  1. 容器编排技术 -- Kubernetes kubectl create clusterrolebinding 命令详解

    容器编排技术 -- Kubernetes kubectl create clusterrolebinding 命令详解 1 kubectl create clusterrolebinding 2 语法 ...

  2. 容器编排技术 -- Kubernetes kubectl create secret 命令详解

    容器编排技术 -- Kubernetes kubectl create secret 命令详解 1 kubectl create secret 2 语法 3 参考: kubectl create se ...

  3. 容器编排技术 -- Kubernetes kubectl create serviceaccount 命令详解

    容器编排技术 -- Kubernetes kubectl create serviceaccount 命令详解 1 kubectl create serviceaccount 2 语法 3 示例 4  ...

  4. 容器编排技术 -- Kubernetes kubectl create service 命令详解

    容器编排技术 -- Kubernetes kubectl create service 命令详解 1 kubectl create service 2 语法 3 参考 kubectl create s ...

  5. 容器编排技术 -- Kubernetes kubectl create role 命令详解

    容器编排技术 -- Kubernetes kubectl create role 命令详解 1 kubectl create role 2 语法 3 示例 4 Flags kubectl create ...

  6. 容器编排技术 -- Kubernetes kubectl create quota 命令详解

    容器编排技术 -- Kubernetes kubectl create quota 命令详解 1 kubectl create quota 2 语法 3 示例 4 Flags kubectl crea ...

  7. 容器编排技术 -- Kubernetes kubectl create poddisruptionbudget 命令详解

    容器编排技术 -- Kubernetes kubectl create poddisruptionbudget 命令详解 1 kubectl create poddisruptionbudget 2  ...

  8. 容器编排技术 -- Kubernetes kubectl create namespace 命令详解

    容器编排技术 -- Kubernetes kubectl create namespace 命令详解 1 kubectl create namespace 2 语法 3 示例 4 Flags kube ...

  9. 容器编排技术 -- Kubernetes kubectl create deployment 命令详解

    容器编排技术 -- Kubernetes kubectl create deployment 命令详解 1 kubectl create deployment 2 语法 3 示例 4 Flags ku ...

最新文章

  1. 风口上的政府大数据 需要消除“大误区”
  2. jsp是怎么连接java_java-如何从jsp中的超链接调用doPost()servlet
  3. postman中设置关联点
  4. element UI 单选框设置默认选中值
  5. Cheat Engine 教程( 1 - 9 通关 )
  6. ReactNative组件导出
  7. sed命令在文件头部插入文本---BSD和GNU版本通用写法
  8. Java中12 种 Spring 常用注解,必须记住!
  9. 模仿QZONE挂图效果
  10. myeclipse-10.7-offline-installer-windows安装图解及注意事项
  11. python大数据和java大数据的区别-做大数据工程师,语言选Java还是Python?
  12. 计算机网络拓扑结构详解
  13. 解读《美国国家BIM标准》— BIM能力成熟度模型(八)
  14. 数字金额转换成中文大写金额的函数
  15. linux查看pv数据量,linux下计算网站PV量、UV量
  16. bzoj 1233 干草堆tower 优先队列优化dp
  17. 解决 Maven工程运行报错Failed to clean project: Failed to delete
  18. ansible之block用法
  19. ESP8266 NodeMCU引脚说明
  20. 红领巾小创客机器人活动计划_争当红领巾小创客--小创客 大梦想

热门文章

  1. 用ShopEx网上开店之安装Zend插件[2]
  2. 文件服务器 之 VSFTPD的高手篇
  3. ASP.NET获取远程网页下载到本地文件
  4. 使用SSH更新WordPress
  5. CSS+jQuery实现滑动幻灯片实例详解
  6. jquery 与 prototype 冲突 Using jQuery with Other Libraries
  7. ubuntu 文件服务器--samba的安装和配置
  8. 分组框 GroupBox
  9. StingBuilde类对象的使用 1126
  10. selenium-cookie相关的操作-0223