kueuectl create resourceflavor
概要
使用给定的名称创建资源类型。
kueuectl create resourceflavor NAME [--node-labels KEY=VALUE] [--node-taints KEY[=VALUE]:EFFECT] [--tolerations KEY[=VALUE][:EFFECT]]|:EFFECT [--dry-run STRATEGY]
示例
# Create a resource flavor
kueuectl create resourceflavor my-resource-flavor
# Create a resource flavor with labels
kueuectl create resourceflavor my-resource-flavor \
--node-labels beta.kubernetes.io/arch=arm64,beta.kubernetes.io/os=linux
# Create a resource flavor with node taints
kueuectl create resourceflavor my-resource-flavor \
--node-taints key1=value:NoSchedule,key2:NoExecute
# Create a resource flavor with tolerations
kueuectl create resourceflavor my-resource-flavor \
--tolerations key1=value:NoSchedule,key2:NoExecute,key3=value,key4,:PreferNoSchedule
选项
--allow-missing-template-keys 默认值:true | |
如果为 true,则在模板中缺少字段或映射键时忽略模板中的任何错误。仅适用于 golang 和 jsonpath 输出格式。 | |
-h, --help | |
resourceflavor 的帮助 | |
--node-labels <以逗号分隔的“键=值”对> 默认值:[] | |
将 ResourceFlavor 与具有相同标签的节点关联起来的标签。 | |
--node-taints 字符串 | |
与此 ResourceFlavor 关联的节点具有的污点。 | |
-o, --output 字符串 | |
输出格式。其中之一:(json、yaml、name、go-template、go-template-file、template、templatefile、jsonpath、jsonpath-as-json、jsonpath-file)。 | |
--show-managed-fields | |
如果为 true,则在以 JSON 或 YAML 格式打印对象时保留 managedFields。 | |
--template 字符串 | |
在 -o=go-template、-o=go-template-file 中使用的模板字符串或模板文件的路径。模板格式是 golang 模板 [https://golang.ac.cn/pkg/text/template/#pkg-overview]。 | |
--tolerations 字符串 | |
将添加到与此资源类型关联的配额中允许的 Pod 中的额外容忍度。 |
从父命令继承的选项
--as 字符串 | |
执行操作时要模拟的用户名。用户可以是普通用户,也可以是命名空间中的服务帐号。 | |
--as-group 字符串 | |
执行操作时要模拟的组,此标志可以重复以指定多个组。 | |
--as-uid 字符串 | |
执行操作时要模拟的 UID。 | |
--cache-dir 字符串 默认值:"$HOME/.kube/cache" | |
默认缓存目录 | |
--certificate-authority 字符串 | |
证书颁发机构的证书文件的路径 | |
--client-certificate 字符串 | |
TLS 的客户端证书文件的路径 | |
--client-key 字符串 | |
TLS 的客户端密钥文件的路径 | |
--cluster 字符串 | |
要使用的 kubeconfig 集群的名称 | |
--context 字符串 | |
要使用的 kubeconfig 上下文的名称 | |
--disable-compression | |
如果为真,则选择退出对服务器的所有请求的响应压缩 | |
--dry-run string 默认值:"none" | |
必须为“none”、“server”或“client”。如果为客户端策略,则仅打印将要发送的对象,而不实际发送。如果为服务器策略,则提交服务器端请求而不保留资源。 | |
--insecure-skip-tls-verify | |
如果为真,则不会检查服务器证书的有效性。这会使你的 HTTPS 连接不安全 | |
--kubeconfig string | |
用于 CLI 请求的 kubeconfig 文件的路径。 | |
-n, --namespace string | |
如果存在,则此 CLI 请求的命名空间范围 | |
--request-timeout string 默认值:"0" | |
放弃单个服务器请求之前等待的时间长度。非零值应包含相应的时间单位(例如 1s、2m、3h)。值为零表示不会使请求超时。 | |
-s, --server string | |
Kubernetes API 服务器的地址和端口 | |
--tls-server-name string | |
用于服务器证书验证的服务器名称。如果未提供,则使用用于联系服务器的主机名 | |
--token string | |
用于向 API 服务器进行身份验证的持有者令牌 | |
--user string | |
要使用的 kubeconfig 用户的名称 |
另请参见
- kueuectl create - 创建资源