CKS clusters deployed before July 7, 2025 have Prometheus Operator pre-installed.CKS clusters deployed after July 7, 2025 don’t have Prometheus Operator pre-installed. Clusters deployed after this date must install Prometheus Operator before proceeding with the following steps.
-
Choose a namespace to deploy the Prometheus Agent in. You can deploy the Prometheus Agent to an existing namespace, or create a new namespace with
kubectl. To create a new namespace, replace[NAMESPACE-NAME]with your chosen namespace and run: -
Configure the Prometheus Agent CustomResource YAML file with your remote-write destination, as in the following example:
For more information aboutsample-prometheus-agent.yaml
remoteWriteconfigurations, see the Prometheus Operator API reference. -
To deploy the Prometheus Agent to your CKS cluster, replace
sample-prometheus-agent.yamlwith the appropriate filename and run:Metrics generated within your CKS cluster now remote-write to your specified destination.