You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or configured in the `args` section of your deployment configuration in a Kubernetes / Openshift context:
10
10
@@ -38,55 +38,57 @@ Available Commands:
38
38
version Print version information.
39
39
40
40
Flags:
41
-
--add_dir_header If true, adds the file directory to the header of the log messages
42
-
--alsologtostderr log to standard error as well as files (no effect when -logtostderr=true)
43
-
--apiserver string The URL of the apiserver to use as a master
44
-
--auth-filter If true, requires authentication and authorization through Kubernetes API to access metrics endpoints
45
-
--auto-gomemlimit Automatically set GOMEMLIMIT to match container or system memory limit. (experimental)
46
-
--auto-gomemlimit-ratio float The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. (experimental) (default 0.9)
47
-
--config string Path to the kube-state-metrics options config file
48
-
--custom-resource-state-config string Inline Custom Resource State Metrics config YAML (experimental)
49
-
--custom-resource-state-config-file string Path to a Custom Resource State Metrics config file (experimental)
50
-
--custom-resource-state-only Only provide Custom Resource State metrics (experimental)
51
-
--enable-gzip-encoding Gzip responses when requested by clients via 'Accept-Encoding: gzip' header.
52
-
-h, --help Print Help text
53
-
--host string Host to expose metrics on. (default "::")
54
-
--kubeconfig string Absolute path to the kubeconfig file
55
-
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
56
-
--log_dir string If non-empty, write log files in this directory (no effect when -logtostderr=true)
57
-
--log_file string If non-empty, use this log file (no effect when -logtostderr=true)
58
-
--log_file_max_size uint Defines the maximum size a log file can grow to (no effect when -logtostderr=true). Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
59
-
--logtostderr log to standard error instead of files (default true)
60
-
--metric-allowlist string Comma-separated list of metrics to be exposed. This list comprises of exact metric names and/or *ECMAScript-based* regex patterns. The allowlist and denylist are mutually exclusive.
61
-
--metric-annotations-allowlist string Comma-separated list of Kubernetes annotations keys that will be used in the resource' labels metric. By default the annotations metrics are not exposed. To include them, provide a list of resource names in their plural form and Kubernetes annotation keys you would like to allow for them (Example: '=namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...)'. A single '*' can be provided per resource instead to allow any annotations, but that has severe performance implications (Example: '=pods=[*]').
62
-
--metric-denylist string Comma-separated list of metrics not to be enabled. This list comprises of exact metric names and/or *ECMAScript-based* regex patterns. The allowlist and denylist are mutually exclusive.
63
-
--metric-labels-allowlist string Comma-separated list of additional Kubernetes label keys that will be used in the resource' labels metric. By default the labels metrics are not exposed. To include them, provide a list of resource names in their plural form and Kubernetes label keys you would like to allow for them (Example: '=namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...)'. A single '*' can be provided per resource instead to allow any labels, but that has severe performance implications (Example: '=pods=[*]'). Additionally, an asterisk (*) can be provided as a key, which will resolve to all resources, i.e., assuming '--resources=deployments,pods', '=*=[*]' will resolve to '=deployments=[*],pods=[*]'.
64
-
--metric-opt-in-list string Comma-separated list of metrics which are opt-in and not enabled by default. This is in addition to the metric allow- and denylists
65
-
--namespaces string Comma-separated list of namespaces to be enabled. Defaults to ""
66
-
--namespaces-denylist string Comma-separated list of namespaces not to be enabled. If namespaces and namespaces-denylist are both set, only namespaces that are excluded in namespaces-denylist will be used.
67
-
--node string Name of the node that contains the kube-state-metrics pod. Most likely it should be passed via the downward API. This is used for daemonset sharding. Only available for resources (pod metrics) that support spec.nodeName fieldSelector. This is experimental.
68
-
--object-limit int The total number of objects to list per resource from the API Server. (experimental)
69
-
--one_output If true, only write logs to their native severity level (vs also writing to each lower severity level; no effect when -logtostderr=true)
70
-
--pod string Name of the pod that contains the kube-state-metrics container. When set, it is expected that --pod and --pod-namespace are both set. Most likely this should be passed via the downward API. This is used for auto-detecting sharding. If set, this has preference over statically configured sharding. This is experimental, it may be removed without notice.
71
-
--pod-namespace string Name of the namespace of the pod specified by --pod. When set, it is expected that --pod and --pod-namespace are both set. Most likely this should be passed via the downward API. This is used for auto-detecting sharding. If set, this has preference over statically configured sharding. This is experimental, it may be removed without notice.
72
-
--port int Port to expose metrics on. (default 8080)
73
-
--resources string Comma-separated list of Resources to be enabled. Defaults to "certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers,ingresses,jobs,leases,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,volumeattachments"
74
-
--server-idle-timeout duration The maximum amount of time to wait for the next request when keep-alives are enabled. Align with the idletimeout of your scrape clients. (default 5m0s)
75
-
--server-read-header-timeout duration The maximum duration for reading the header of requests. (default 5s)
76
-
--server-read-timeout duration The maximum duration for reading the entire request, including the body. Align with the scrape interval or timeout of scraping clients. (default 1m0s)
77
-
--server-write-timeout duration The maximum duration before timing out writes of the response. Align with the scrape interval or timeout of scraping clients.. (default 1m0s)
78
-
--shard int32 The instances shard nominal (zero indexed) within the total number of shards. (default 0)
79
-
--skip_headers If true, avoid header prefixes in the log messages
80
-
--skip_log_headers If true, avoid headers when opening log files (no effect when -logtostderr=true)
81
-
--stderrthreshold severity logs at or above this threshold go to stderr when writing to files and stderr (no effect when -logtostderr=true or -alsologtostderr=true) (default 2)
82
-
--telemetry-host string Host to expose kube-state-metrics self metrics on. (default "::")
83
-
--telemetry-port int Port to expose kube-state-metrics self metrics on. (default 8081)
84
-
--tls-config string Path to the TLS configuration file
85
-
--total-shards int The total number of shards. Sharding is disabled when total shards is set to 1. (default 1)
86
-
--track-unscheduled-pods This configuration is used in conjunction with node configuration. When this configuration is true, node configuration is empty and the metric of unscheduled pods is fetched from the Kubernetes API Server. This is experimental.
87
-
--use-apiserver-cache Sets resourceVersion=0 for ListWatch requests, using cached resources from the apiserver instead of an etcd quorum read.
88
-
-v, --v Level number for the log level verbosity
89
-
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
41
+
--add_dir_header If true, adds the file directory to the header of the log messages
42
+
--alsologtostderr log to standard error as well as files (no effect when -logtostderr=true)
43
+
--apiserver string The URL of the apiserver to use as a master
44
+
--auth-filter If true, requires authentication and authorization through Kubernetes API to access metrics endpoints
45
+
--auto-gomemlimit Automatically set GOMEMLIMIT to match container or system memory limit. (experimental)
46
+
--auto-gomemlimit-ratio float The ratio of reserved GOMEMLIMIT memory to the detected maximum container or system memory. (experimental) (default 0.9)
47
+
--config string Path to the kube-state-metrics options config file
48
+
--continue-without-config If true, kube-state-metrics continues to run even if the config file specified by --config is not present. This is useful for scenarios where config file is not provided at startup but is provided later, for e.g., via configmap. Kube-state-metrics will not exit with an error if the config file is not found, instead watches and reloads when it is created.
49
+
--continue-without-custom-resource-state-config-file If true, Kube-state-metrics continues to run even if the config file specified by --custom-resource-state-config-file is not present. This is useful for scenarios where config file is not provided at startup but is provided later, for e.g., via configmap. Kube-state-metrics will not exit with an error if the custom-resource-state-config file is not found, instead watches and reloads when it is created.
50
+
--custom-resource-state-config string Inline Custom Resource State Metrics config YAML (experimental)
51
+
--custom-resource-state-config-file string Path to a Custom Resource State Metrics config file (experimental)
52
+
--custom-resource-state-only Only provide Custom Resource State metrics (experimental)
53
+
--enable-gzip-encoding Gzip responses when requested by clients via 'Accept-Encoding: gzip' header.
54
+
-h, --help Print Help text
55
+
--host string Host to expose metrics on. (default "::")
56
+
--kubeconfig string Absolute path to the kubeconfig file
57
+
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
58
+
--log_dir string If non-empty, write log files in this directory (no effect when -logtostderr=true)
59
+
--log_file string If non-empty, use this log file (no effect when -logtostderr=true)
60
+
--log_file_max_size uint Defines the maximum size a log file can grow to (no effect when -logtostderr=true). Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
61
+
--logtostderr log to standard error instead of files (default true)
62
+
--metric-allowlist string Comma-separated list of metrics to be exposed. This list comprises of exact metric names and/or *ECMAScript-based* regex patterns. The allowlist and denylist are mutually exclusive.
63
+
--metric-annotations-allowlist string Comma-separated list of Kubernetes annotations keys that will be used in the resource' labels metric. By default the annotations metrics are not exposed. To include them, provide a list of resource names in their plural form and Kubernetes annotation keys you would like to allow for them (Example: '=namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...)'. A single '*' can be provided per resource instead to allow any annotations, but that has severe performance implications (Example: '=pods=[*]').
64
+
--metric-denylist string Comma-separated list of metrics not to be enabled. This list comprises of exact metric names and/or *ECMAScript-based* regex patterns. The allowlist and denylist are mutually exclusive.
65
+
--metric-labels-allowlist string Comma-separated list of additional Kubernetes label keys that will be used in the resource' labels metric. By default the labels metrics are not exposed. To include them, provide a list of resource names in their plural form and Kubernetes label keys you would like to allow for them (Example: '=namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...)'. A single '*' can be provided per resource instead to allow any labels, but that has severe performance implications (Example: '=pods=[*]'). Additionally, an asterisk (*) can be provided as a key, which will resolve to all resources, i.e., assuming '--resources=deployments,pods', '=*=[*]' will resolve to '=deployments=[*],pods=[*]'.
66
+
--metric-opt-in-list string Comma-separated list of metrics which are opt-in and not enabled by default. This is in addition to the metric allow- and denylists
67
+
--namespaces string Comma-separated list of namespaces to be enabled. Defaults to ""
68
+
--namespaces-denylist string Comma-separated list of namespaces not to be enabled. If namespaces and namespaces-denylist are both set, only namespaces that are excluded in namespaces-denylist will be used.
69
+
--node string Name of the node that contains the kube-state-metrics pod. Most likely it should be passed via the downward API. This is used for daemonset sharding. Only available for resources (pod metrics) that support spec.nodeName fieldSelector. This is experimental.
70
+
--object-limit int The total number of objects to list per resource from the API Server. (experimental)
71
+
--one_output If true, only write logs to their native severity level (vs also writing to each lower severity level; no effect when -logtostderr=true)
72
+
--pod string Name of the pod that contains the kube-state-metrics container. When set, it is expected that --pod and --pod-namespace are both set. Most likely this should be passed via the downward API. This is used for auto-detecting sharding. If set, this has preference over statically configured sharding. This is experimental, it may be removed without notice.
73
+
--pod-namespace string Name of the namespace of the pod specified by --pod. When set, it is expected that --pod and --pod-namespace are both set. Most likely this should be passed via the downward API. This is used for auto-detecting sharding. If set, this has preference over statically configured sharding. This is experimental, it may be removed without notice.
74
+
--port int Port to expose metrics on. (default 8080)
75
+
--resources string Comma-separated list of Resources to be enabled. Defaults to "certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers,ingresses,jobs,leases,limitranges,mutatingwebhookconfigurations,namespaces,networkpolicies,nodes,persistentvolumeclaims,persistentvolumes,poddisruptionbudgets,pods,replicasets,replicationcontrollers,resourcequotas,secrets,services,statefulsets,storageclasses,validatingwebhookconfigurations,volumeattachments"
76
+
--server-idle-timeout duration The maximum amount of time to wait for the next request when keep-alives are enabled. Align with the idletimeout of your scrape clients. (default 5m0s)
77
+
--server-read-header-timeout duration The maximum duration for reading the header of requests. (default 5s)
78
+
--server-read-timeout duration The maximum duration for reading the entire request, including the body. Align with the scrape interval or timeout of scraping clients. (default 1m0s)
79
+
--server-write-timeout duration The maximum duration before timing out writes of the response. Align with the scrape interval or timeout of scraping clients.. (default 1m0s)
80
+
--shard int32 The instances shard nominal (zero indexed) within the total number of shards. (default 0)
81
+
--skip_headers If true, avoid header prefixes in the log messages
82
+
--skip_log_headers If true, avoid headers when opening log files (no effect when -logtostderr=true)
83
+
--stderrthreshold severity logs at or above this threshold go to stderr when writing to files and stderr (no effect when -logtostderr=true or -alsologtostderr=true) (default 2)
84
+
--telemetry-host string Host to expose kube-state-metrics self metrics on. (default "::")
85
+
--telemetry-port int Port to expose kube-state-metrics self metrics on. (default 8081)
86
+
--tls-config string Path to the TLS configuration file
87
+
--total-shards int The total number of shards. Sharding is disabled when total shards is set to 1. (default 1)
88
+
--track-unscheduled-pods This configuration is used in conjunction with node configuration. When this configuration is true, node configuration is empty and the metric of unscheduled pods is fetched from the Kubernetes API Server. This is experimental.
89
+
--use-apiserver-cache Sets resourceVersion=0 for ListWatch requests, using cached resources from the apiserver instead of an etcd quorum read.
90
+
-v, --v Level number for the log level verbosity
91
+
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
90
92
91
93
Use "kube-state-metrics [command] --help" for more information about a command.
0 commit comments