Back to Autoscaler

Vertical Pod Autoscaler Flags

vertical-pod-autoscaler/docs/flags.md

latest23.6 KB
Original Source

Vertical Pod Autoscaler Flags

This document contains the flags for all VPA components.

To view the most recent release of flags for all VPA components, consult the release tag flags(1.6.0) documentation.

Note: This document is auto-generated from the default branch (master) of the VPA repository.

<!-- toc --> <!-- /toc -->

What are the parameters to VPA admission-controller?

This document is auto-generated from the flag definitions in the VPA admission-controller code.

FlagTypeDefaultDescription
add-dir-headerIf true, adds the file directory to the header of the log messages
addressstring":8944"The address to expose Prometheus metrics.
alsologtostderrlog to standard error as well as files (no effect when -logtostderr=true)
client-ca-filestring"/etc/tls-certs/caCert.pem"Path to CA PEM file.
feature-gatesmapStringBoolA set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
AllAlpha=true|false (ALPHA - default=false)
AllBeta=true|false (BETA - default=false)
CPUStartupBoost=true|false (ALPHA - default=false)
PerVPAConfig=true|false (ALPHA - default=false)
ignored-vpa-object-namespacesstringA comma-separated list of namespaces to ignore when searching for VPA objects. Leave empty to avoid ignoring any namespaces. These namespaces will not be cleaned by the garbage collector.
kube-api-burstfloat100QPS burst limit when making requests to Kubernetes apiserver
kube-api-qpsfloat50QPS limit when making requests to Kubernetes apiserver
kubeconfigstringPath to a kubeconfig. Only required if out-of-cluster.
log-backtrace-attraceLocation:0when logging hits line file:N, emit a stack trace
log-dirstringIf non-empty, write log files in this directory (no effect when -logtostderr=true)
log-filestringIf non-empty, use this log file (no effect when -logtostderr=true)
log-file-max-sizeint1800uDefines 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.
logtostderrtruelog to standard error instead of files
max-allowed-cpu-boostquantity Maximum amount of CPU that will be applied for a container with boost.
min-tls-versionstringThe minimum TLS version to accept. Must be set to either tls1_2 or tls1_3. (default "tls1_2")
one-outputseverityIf true, only write logs to their native level (vs also writing to each lower severity level; no effect when -logtostderr=true)
portint8000The port to listen on.
profilingintIs debug/pprof endpoenabled
register-by-urlIf set to true, admission webhook will be registered by URL (webhookAddress:webhookPort) instead of by service name
register-webhooktrueIf set to true, admission webhook object will be created on start up to register with the API server.
reload-certIf set to true, reload leaf and CA certificates when changed.
skip-headersIf true, avoid header prefixes in the log messages
skip-log-headersIf true, avoid headers when opening log files (no effect when -logtostderr=true)
stderrthresholdseverity: infoset the log level threshold for writing to standard error
tls-cert-filestring"/etc/tls-certs/serverCert.pem"Path to server certificate PEM file.
tls-ciphersstringA comma-separated or colon-separated list of ciphers to accept. Only works when min-tls-version is set to tls1_2.
tls-private-keystring"/etc/tls-certs/serverKey.pem"Path to server certificate key PEM file.
v,: 4, --v Level set the log level verbosity (default 4)
vmodulemoduleSpeccomma-separated list of pattern=N settings for file-filtered logging
vpa-object-namespacestringSpecifies the namespace to search for VPA objects. Leave empty to include all namespaces. If provided, the garbage collector will only clean this namespace.
webhook-addressstringAddress under which webhook is registered. Used when registerByURL is set to true.
webhook-failure-policy-failIf set to true, will configure the admission webhook failurePolicy to "Fail". Use with caution.
webhook-labelsstringComma separated list of labels to add to the webhook object. Format: key1:value1,key2:value2
webhook-portstringServer Port for Webhook
webhook-servicestring"vpa-webhook"Kubernetes service under which webhook is registered. Used when registerByURL is set to false.
webhook-timeout-secondsint30Timeout in seconds that the API server should wait for this webhook to respond before failing.

What are the parameters to VPA recommender?

This document is auto-generated from the flag definitions in the VPA recommender code.

FlagTypeDefaultDescription
add-dir-headerIf true, adds the file directory to the header of the log messages
addressstring":8942"The address to expose Prometheus metrics.
alsologtostderrlog to standard error as well as files (no effect when -logtostderr=true)
checkpoints-gc-interval10m0sduration How often orphaned checkpoints should be garbage collected
checkpoints-timeout1m0sduration Timeout for writing checkpoints since the start of the recommender's main loop
confidence-interval-cpu24h0m0sduration The time interval used for computing the confidence multiplier for the CPU lower and upper bound. Default: 24h
confidence-interval-memory24h0m0sduration The time interval used for computing the confidence multiplier for the memory lower and upper bound. Default: 24h
container-name-labelstring"name"Label name to look for container names
container-namespace-labelstring"namespace"Label name to look for container namespaces
container-pod-name-labelstring"pod_name"Label name to look for container pod names
container-recommendation-max-allowed-cpuquantity Maximum amount of CPU that will be recommended for a container. VerticalPodAutoscaler-level maximum allowed takes precedence over the global maximum allowed.
container-recommendation-max-allowed-memoryquantity Maximum amount of memory that will be recommended for a container. VerticalPodAutoscaler-level maximum allowed takes precedence over the global maximum allowed.
cpu-histogram-decay-half-life24h0m0sduration The amount of time it takes a historical CPU usage sample to lose half of its weight.
cpu-integer-post-processor-enabledEnable the cpu-integer recommendation post processor. The post processor will round up CPU recommendations to a whole CPU for pods which were opted in by setting an appropriate label on VPA object (experimental)
external-metrics-cpu-metricstringALPHA. Metric to use with external metrics provider for CPU usage.
external-metrics-memory-metricstringALPHA. Metric to use with external metrics provider for memory usage.
feature-gatesmapStringBoolA set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
AllAlpha=true|false (ALPHA - default=false)
AllBeta=true|false (BETA - default=false)
CPUStartupBoost=true|false (ALPHA - default=false)
PerVPAConfig=true|false (ALPHA - default=false)
history-lengthstring"8d"How much time back prometheus have to be queried to get historical metrics
history-resolutionstring"1h"Resolution at which Prometheus is queried for historical metrics
humanize-memoryDEPRECATED: Convert memory values in recommendations to the highest appropriate SI unit with up to 2 decimal places for better readability. This flag is deprecated and will be removed in a future version. Use --round-memory-bytes instead.
ignored-vpa-object-namespacesstringA comma-separated list of namespaces to ignore when searching for VPA objects. Leave empty to avoid ignoring any namespaces. These namespaces will not be cleaned by the garbage collector.
kube-api-burstfloat100QPS burst limit when making requests to Kubernetes apiserver
kube-api-qpsfloat50QPS limit when making requests to Kubernetes apiserver
kubeconfigstringPath to a kubeconfig. Only required if out-of-cluster.
leader-electStart a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability.
leader-elect-lease-duration15sduration The duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.
leader-elect-renew-deadline10sduration The interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than the lease duration. This is only applicable if leader election is enabled.
leader-elect-resource-lockstring"leases"The type of resource object that is used for locking during leader election. Supported options are 'leases'.
leader-elect-resource-namestring"vpa-recommender-lease"The name of resource object that is used for locking during leader election.
leader-elect-resource-namespacestring"kube-system"The namespace of resource object that is used for locking during leader election.
leader-elect-retry-period2sduration The duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.
log-backtrace-attraceLocation:0when logging hits line file:N, emit a stack trace
log-dirstringIf non-empty, write log files in this directory (no effect when -logtostderr=true)
log-filestringIf non-empty, use this log file (no effect when -logtostderr=true)
log-file-max-sizeint1800uDefines 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.
logtostderrtruelog to standard error instead of files
memory-aggregation-interval24h0m0sduration The length of a single interval, for which the peak memory usage is computed. Memory usage peaks are aggregated in multiples of this interval. In other words there is one memory usage sample per interval (the maximum usage over that interval)
memory-aggregation-interval-countint8The number of consecutive memory-aggregation-intervals which make up the MemoryAggregationWindowLength which in turn is the period for memory usage aggregation by VPA. In other words, MemoryAggregationWindowLength = memory-aggregation-interval * memory-aggregation-interval-count.
memory-histogram-decay-half-life24h0m0sduration The amount of time it takes a historical memory usage sample to lose half of its weight. In other words, a fresh usage sample is twice as 'important' as one with age equal to the half life period.
memory-saverIf true, only track pods which have an associated VPA
metric-for-pod-labelsstring"up{job="kubernetes-pods"}"Which metric to look for pod labels in metrics
min-checkpointsint10Minimum number of checkpoints to write per recommender's main loop. WARNING: this flag is deprecated and doesn't have any effect. It will be removed in a future release. Refer to update-worker-count to influence the minimum number of checkpoints written per loop.
one-outputseverityIf true, only write logs to their native level (vs also writing to each lower severity level; no effect when -logtostderr=true)
oom-bump-up-ratiofloat1.2Default memory bump up ratio when OOM occurs. This value applies to all VPAs unless overridden in the VPA spec. Default is 1.2.
oom-min-bump-up-bytesfloat1.048576e+08Default minimal increase of memory (in bytes) when OOM occurs. This value applies to all VPAs unless overridden in the VPA spec. Default is 100 * 1024 * 1024 (100Mi).
passwordstringThe password used in the prometheus server basic auth. Can also be set via the PROMETHEUS_PASSWORD environment variable
pod-label-prefixstring"pod_label_"Which prefix to look for pod labels in metrics
pod-name-labelstring"kubernetes_pod_name"Label name to look for pod names
pod-namespace-labelstring"kubernetes_namespace"Label name to look for pod namespaces
pod-recommendation-min-cpu-millicoresfloat25Minimum CPU recommendation for a pod
pod-recommendation-min-memory-mbfloat250Minimum memory recommendation for a pod
profilingintIs debug/pprof endpoenabled
prometheus-addressstring"http://prometheus.monitoring.svc"Where to reach for Prometheus metrics
prometheus-bearer-tokenstringThe bearer token used in the Prometheus server bearer token auth
prometheus-bearer-token-filestringPath to the bearer token file used for authentication by the Prometheus server
prometheus-cadvisor-job-namestring"kubernetes-cadvisor"Name of the prometheus job name which scrapes the cAdvisor metrics
prometheus-insecureSkip tls verify if https is used in the prometheus-address
prometheus-query-timeoutstring"5m"How long to wait before killing long queries
recommendation-lower-bound-cpu-percentilefloat0.5CPU usage percentile that will be used for the lower bound on CPU recommendation.
recommendation-lower-bound-memory-percentilefloat0.5Memory usage percentile that will be used for the lower bound on memory recommendation.
recommendation-margin-fractionfloat0.15Fraction of usage added as the safety margin to the recommended request
recommendation-upper-bound-cpu-percentilefloat0.95CPU usage percentile that will be used for the upper bound on CPU recommendation.
recommendation-upper-bound-memory-percentilefloat0.95Memory usage percentile that will be used for the upper bound on memory recommendation.
recommender-interval1m0sduration How often metrics should be fetched
recommender-namestring"default"Set the recommender name. Recommender will generate recommendations for VPAs that configure the same recommender name. If the recommender name is left as default it will also generate recommendations that don't explicitly specify recommender. You shouldn't run two recommenders with the same name in a cluster.
round-cpu-millicoresint1CPU recommendation rounding factor in millicores. The CPU value will always be rounded up to the nearest multiple of this factor.
round-memory-bytesint1Memory recommendation rounding factor in bytes. The Memory value will always be rounded up to the nearest multiple of this factor.
skip-headersIf true, avoid header prefixes in the log messages
skip-log-headersIf true, avoid headers when opening log files (no effect when -logtostderr=true)
stderrthresholdseverity: infoset the log level threshold for writing to standard error
storagestringSpecifies storage mode. Supported values: prometheus, checkpoint
target-cpu-percentilefloat0.9CPU usage percentile that will be used as a base for CPU target recommendation. Doesn't affect CPU lower bound, CPU upper bound nor memory recommendations.
target-memory-percentilefloat0.9Memory usage percentile that will be used as a base for memory target recommendation. Doesn't affect memory lower bound nor memory upper bound.
update-worker-countint10Number of concurrent workers to update VPA recommendations and checkpoints. When increasing this setting, make sure the client-side rate limits ('kube-api-qps' and 'kube-api-burst') are either increased or turned off as well. Determines the minimum number of VPA checkpoints written per recommender loop.
use-external-metricsALPHA. Use an external metrics provider instead of metrics_server.
usernamestringThe username used in the prometheus server basic auth. Can also be set via the PROMETHEUS_USERNAME environment variable
v,: 4, --v Level set the log level verbosity (default 4)
vmodulemoduleSpeccomma-separated list of pattern=N settings for file-filtered logging
vpa-object-namespacestringSpecifies the namespace to search for VPA objects. Leave empty to include all namespaces. If provided, the garbage collector will only clean this namespace.

What are the parameters to VPA updater?

This document is auto-generated from the flag definitions in the VPA updater code.

FlagTypeDefaultDescription
add-dir-headerIf true, adds the file directory to the header of the log messages
addressstring":8943"The address to expose Prometheus metrics.
alsologtostderrlog to standard error as well as files (no effect when -logtostderr=true)
evict-after-oom-threshold10m0sduration The default duration to evict pods that have OOMed in less than evict-after-oom-threshold since start.
eviction-rate-burstint1Burst of pods that can be evicted.
eviction-rate-limitfloat-1Number of pods that can be evicted per seconds. A rate limit set to 0 or -1 will disable the rate limiter.
eviction-tolerancefloat0.5Fraction of replica count that can be evicted for update, if more than one pod can be evicted.
feature-gatesmapStringBoolA set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
AllAlpha=true|false (ALPHA - default=false)
AllBeta=true|false (BETA - default=false)
CPUStartupBoost=true|false (ALPHA - default=false)
PerVPAConfig=true|false (ALPHA - default=false)
ignored-vpa-object-namespacesstringA comma-separated list of namespaces to ignore when searching for VPA objects. Leave empty to avoid ignoring any namespaces. These namespaces will not be cleaned by the garbage collector.
in-place-skip-disruption-budget[ALPHA] If true, VPA updater skips disruption budget checks for in-place pod updates when all containers have NotRequired resize policy (or no policy defined) for both CPU and memory resources. Disruption budgets are still respected when any container has RestartContainer resize policy for any resource.
in-recommendation-bounds-eviction-lifetime-threshold12h0m0sduration Pods that live for at least that long can be evicted even if their request is within the [MinRecommended...MaxRecommended] range
kube-api-burstfloat100QPS burst limit when making requests to Kubernetes apiserver
kube-api-qpsfloat50QPS limit when making requests to Kubernetes apiserver
kubeconfigstringPath to a kubeconfig. Only required if out-of-cluster.
leader-electStart a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability.
leader-elect-lease-duration15sduration The duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled.
leader-elect-renew-deadline10sduration The interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than the lease duration. This is only applicable if leader election is enabled.
leader-elect-resource-lockstring"leases"The type of resource object that is used for locking during leader election. Supported options are 'leases'.
leader-elect-resource-namestring"vpa-updater"The name of resource object that is used for locking during leader election.
leader-elect-resource-namespacestring"kube-system"The namespace of resource object that is used for locking during leader election.
leader-elect-retry-period2sduration The duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled.
log-backtrace-attraceLocation:0when logging hits line file:N, emit a stack trace
log-dirstringIf non-empty, write log files in this directory (no effect when -logtostderr=true)
log-filestringIf non-empty, use this log file (no effect when -logtostderr=true)
log-file-max-sizeint1800uDefines 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.
logtostderrtruelog to standard error instead of files
min-replicasint2Minimum number of replicas to perform update
one-outputseverityIf true, only write logs to their native level (vs also writing to each lower severity level; no effect when -logtostderr=true)
pod-update-thresholdfloat0.1Ignore updates that have priority lower than the value of this flag
profilingintIs debug/pprof endpoenabled
skip-headersIf true, avoid header prefixes in the log messages
skip-log-headersIf true, avoid headers when opening log files (no effect when -logtostderr=true)
stderrthresholdseverity: infoset the log level threshold for writing to standard error
updater-interval1m0sduration How often updater should run
use-admission-controller-statustrueIf true, updater will only evict pods when admission controller status is valid.
v,: 4, --v Level set the log level verbosity (default 4)
vmodulemoduleSpeccomma-separated list of pattern=N settings for file-filtered logging
vpa-object-namespacestringSpecifies the namespace to search for VPA objects. Leave empty to include all namespaces. If provided, the garbage collector will only clean this namespace.