CKS Clusters deployed before July 7, 2025 have Prometheus Operator pre-installed.CKS clusters deployed after July 7, 2025 do not have the Prometheus Operator pre-installed. Clusters deployed after this date must install Prometheus Operator before proceeding with the steps below.
-
Choose a namespace to deploy the Prometheus Agent in. You may deploy the Prometheus Agent to an existing namespace, or create a new namespace with
kubectl: To create a new namespace, run the following command, replacingMY_REMOTE_WRITE_NAMESPACEwith your chosen namespace: -
Configure the Prometheus Agent CustomResource YAML file with your remote-write destination, as in the following example:
For more details on specifying thesample-prometheus-agent.yaml
remoteWriteconfiguration(s), see Prometheus Operator’s API reference. -
Use
kubectlto deploy the Prometheus Agent to your CKS cluster with the following command, replacingsample-prometheus-agent.yamlwith the appropriate filename:Metrics generated within your CKS cluster will now remote-write to your specified destination.