// This assembly is included in the following assemblies:
//
// metrics/assembly_metrics-prometheus-alertmanager.adoc

[id='proc-metrics-deploying-prometheus-alertmanager-{context}']

= Deploying Alertmanager

To deploy Alertmanager, apply the xref:ref-metrics-config-files-{context}[example configuration files].

The sample configuration provided with Strimzi configures the Alertmanager to send notifications to a Slack channel.

The following resources are defined on deployment:

* An `Alertmanager` to manage the Alertmanager pod.
* A `Secret` to manage the configuration of the Alertmanager.
* A `Service` to provide an easy to reference hostname for other services to connect to Alertmanager (such as Prometheus).

.Prerequisites
* xref:proc-metrics-kafka-deploy-options-{context}[Metrics are configured for the Kafka cluster resource]
* xref:assembly-metrics-prometheus-{context}[Prometheus is deployed]

.Procedure

. Create a `Secret` resource from the Alertmanager configuration file (`alert-manager-config.yaml`):
+
[source,shell,subs="+quotes,attributes"]
kubectl create secret generic alertmanager-alertmanager --from-file=alertmanager.yaml=alert-manager-config.yaml

. Update the `alert-manager-config.yaml` file to replace the:
+
* `slack_api_url` property with the actual value of the Slack API URL related to the application for the Slack workspace
* `channel` property with the actual Slack channel on which to send notifications

. Deploy Alertmanager:
+
[source,shell,subs="+quotes,attributes"]
kubectl apply -f alert-manager.yaml
