Hi guys,
I'm implementing alertmanager HA.
alertmanager0:
-----------------------------------------
containers:
- name: alertmanager
args:
- "--config.file=/etc/alertmanager/config.yml"
- "--storage.path=/alertmanager"
-----------------------------------------------
alertmanager1:
--------------------------------------------
containers:
- name: alertmanager
args:
- "--config.file=/etc/alertmanager/config.yml"
- "--storage.path=/alertmanager"
- "--cluster.peer=internal_ip_of_alertmanager0:9094"
alertmanager service:
-------------------------------------------------
apiVersion: v1
kind: Service
metadata:
name: alertmanager
namespace: monitoring
spec:
selector:
app: alertmanager
type: NodePort
ports:
- port: 9093
targetPort: 9093
nodePort: 31000
I have a question that if alertmanager0 restarts, then the internal ip will be changed. So I may have to update the deployment file and re-apply again.
May I ask if there is a way to assign a DNS something like this to the internal IP address?