- Inspecting Istio’s default Prometheus configuration
- Adding Alertmanager to Prometheus
- Writing and applying alerting rules
- Configuring Slack notifications in Alertmanager
- Testing alerts and silencing notifications
1 Inspect the default Istio Prometheus configuration
Istio’s add-ons include a Prometheus deployment whoseConfigMap defines scrape targets and placeholder alerts. It also deploys:
- A ServiceAccount for Prometheus
- A ConfigMap containing
prometheus.ymlandalerting_rules.yml - ClusterRoles, RoleBindings, Service, and Deployment specs

samples/addons, you’ll find the Prometheus example:

ConfigMap:
By default, there is no
alerting: section in prometheus.yml pointing to Alertmanager.2 Integrate Prometheus with Alertmanager
-
Open the Prometheus
ConfigMapin theistio-systemnamespace: -
Under
prometheus.yml, add: -
Save, then restart Prometheus:
- In the Prometheus UI, go to Status → Configuration to verify the Alertmanager endpoint.
3 Define custom alerting rules
Editalerting_rules.yml in the same ConfigMap to add your rules. For inspiration, see Awesome Prometheus Alerts:

3.1 Example rule group

4 Configure Alertmanager for Slack notifications
Update youralertmanager.yml:
5 Test end-to-end alerting
5.1 Simulate HTTP 403 errors
-
Deploy an Nginx pod and service in namespace
prod: -
Disable Istio mTLS:
-
Remove the default page to force 403 responses:
-
Flood the pod with requests:



5.2 Silence active alerts
- In Alertmanager, go to Silences → New Silence
- Add matchers (e.g.,
alertname="KubernetesPodClientError") - Set the duration and save


n2-403, n3-403, n4-403); only unsilenced alerts will appear in Slack:

5.3 Test the InstanceDown alert
Delete one of the demo pods to trigger InstanceDown:
Conclusion
You have now:- Updated Istio’s Prometheus
ConfigMapto point at Alertmanager - Defined custom alerting rules in Prometheus
- Configured Alertmanager to send Slack notifications
- Tested alert firing, notification delivery, and silencing
Links and References
- Istio Prometheus Add-ons
- Alertmanager Slack Integration
- Awesome Prometheus Alerts
- Kubernetes Documentation
- Slack Incoming Webhooks