kubernetes deployment notification to slack channel using webhook

8/7/2019

I have set up the notification for cloud build CI/CD which is pushing notification to a respective slack channel.

After a successful build that image push to kubernetes cluster and rolling update strategy followed by deployment.

So I want to push notification when new pod become ready and old pod terminated so that time gets an idea about new changes applied to deployment.

Note : I am using GKE cluster but not installed Prometheus due to resource limits.

-- Harsh Manvar
docker
google-kubernetes-engine
kubernetes

2 Answers

8/7/2019

There are multiple ways of doing this, I can think of two ways right now:

  1. Use Prometheus + Alert manager to send you a slack notification when pods became ready.
  2. Use CI/CD pipeline to continuously check for the status of the pods, once they are updated successfully, send a notification.

Hope this answers your question.

EDIT: If you would like to stick to using stackdriver, then there is a solution for it as well: https://kubernetes.io/docs/tasks/debug-application-cluster/events-stackdriver/

-- Harith
Source: StackOverflow

8/7/2019

If you cannot afford to Prometheus stack due to resources limitation check kubewatch it has slack support build-in so it should be suitable for your needs.

-- FL3SH
Source: StackOverflow