diff --git a/cluster-autoscaler/FAQ.md b/cluster-autoscaler/FAQ.md index 17b25a0a8281..8a5de753c76d 100644 --- a/cluster-autoscaler/FAQ.md +++ b/cluster-autoscaler/FAQ.md @@ -29,6 +29,7 @@ this document: * [I'm running cluster with nodes in multiple zones for HA purposes. Is that supported by Cluster Autoscaler?](#im-running-cluster-with-nodes-in-multiple-zones-for-ha-purposes-is-that-supported-by-cluster-autoscaler) * [How can I monitor Cluster Autoscaler?](#how-can-i-monitor-cluster-autoscaler) * [How can I increase the information that the CA is logging?](#how-can-i-increase-the-information-that-the-ca-is-logging) + * [How can I change the log format that the CA output?](#how-can-i-change-the-log-format-that-the-ca-output) * [How can I see all the events from Cluster Autoscaler?](#how-can-i-see-all-events-from-cluster-autoscaler) * [How can I scale my cluster to just 1 node?](#how-can-i-scale-my-cluster-to-just-1-node) * [How can I scale a node group to 0?](#how-can-i-scale-a-node-group-to-0) @@ -923,6 +924,20 @@ or infrastructure endpoints, then setting a value of `--v=9` will show all the i HTTP calls made. Be aware that using verbosity levels higher than `--v=1` will generate an increased amount of logs, prepare your deployments and storage accordingly. +### How Can I change the log format that the CA output? + +There are 2 log format options, `text` and `json`. By default (`text`), the Cluster Autoscaler will output +logs in the [klog native format](https://kubernetes.io/docs/concepts/cluster-administration/system-logs/#klog-output). +``` +I0823 17:15:11.472183 29944 main.go:569] Cluster Autoscaler 1.28.0-beta.0 +``` + +Alternatively, adding the flag `--logging-format=json` changes the +[log output to json](https://kubernetes.io/docs/concepts/cluster-administration/system-logs/#klog-output). +``` +{"ts":1692825334994.433,"caller":"cluster-autoscaler/main.go:569","msg":"Cluster Autoscaler 1.28.0-beta.0\n","v":1} +``` + ### What events are emitted by CA? Whenever Cluster Autoscaler adds or removes nodes it will create events