kubectl命令详解(kubectl config)

kubectl命令详解(kubectl config)Name Shorthand Default Usage allow missing template keys nbsp true If true ignore any errors in templates when a field or map key is missing in the template Only applies to golang and

大家好,我是讯享网,很高兴认识大家。

 NameShorthandDefaultUsage 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. cluster-ip     ClusterIP to be assigned to the service. Leave empty to auto-allocate, or set to ‘None’ to create a headless service. container-port     Synonym for –target-port dry-run   false If true, only print the object that would be sent, without sending it. external-ip     Additional external IP address (not managed by Kubernetes) to accept for the service. If this IP is routed to a node, the service can be accessed by this IP in addition to its generated service IP. 用于接受服务的额外的外部IP地址(不被kubernetes管理)。如果这个IP被路由到一个节点,则这个服务处理被它产生的service IP接入外,还可以被这个IP接入。 filename f [] Filename, directory, or URL to files identifying the resource to expose a service generator   service/v2 The name of the API generator to use. There are 2 generators: ‘service/v1’ and ‘service/v2’. The only difference between them is that service port in v1 is named ‘default’, while it is left unnamed in v2. Default is ‘service/v2’. labels l   Labels to apply to the service created by this call. load-balancer-ip     IP to assign to the Load Balancer. If empty, an ephemeral IP will be created and used (cloud-provider specific). name     The name for the newly created object. 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’). overrides     An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field. port     The port that the service should serve on. Copied from the resource being exposed, if unspecified protocol     The network protocol for the service to be created. Default is ‘TCP’. record   false Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists. recursive R false Process the directory used in -f, –filename recursively. Useful when you want to manage related manifests organized within the same directory. 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. selector     A label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.) session-affinity     If non-empty, set the session affinity for the service to this; legal values: ‘None’, ‘ClientIP’ 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. target-port     Name or number for the port on the container that the service should direct traffic to. Optional. 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]. type     Type for this service: ClusterIP, NodePort, or LoadBalancer. Default is ‘ClusterIP’.


讯享网

小讯
上一篇 2025-06-16 12:57
下一篇 2025-06-16 10:07

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/154871.html