How to Send Kubernetes Events to a WebHook

 


At first add the helm repo

helm repo add bitnami https://charts.bitnami.com/bitnami


Then install kubernetes event exporter (default namespace)


helm install kubernetes-event-exporter bitnami/kubernetes-event-exporter

 

Export the values file


helm inspect values bitnami/kubernetes-event-exporter > /tmp/event-exporter.yaml

 

Go to  https://webhook.site

 

Collect a webhook url and paste it in values file

 

config:
route:
routes:
- match:
- receiver: "alerts"

receivers:
- name: "alerts"
webhook:
endpoint: "https://webhook.site/fc40de73-423c-4c16yu77suuua"
headers:
User-Agent: kube-event-exporter 1.0

 

Upgrade the helm value

 

helm upgrade  kubernetes-event-exporter bitnami/kubernetes-event-exporter -f /tmp/event-exporter.yaml

 

Then delete a pod or create a pod. You will get the events to the webhook url. 





Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment