Six tools to Simplify Kubernetes Journey — Day 5 — Kubewatch — A watcher for Kubernetes

  • hipchat
  • mattermost
  • flock
  • webhook
  • smtp

Installation

In this blog, we will use helm to install kubewatch and use slack as the notification medium. But before setting up helm and slack, you must need to have your running Kubernetes cluster. Please check the link on how to configure the Kubernetes cluster using kind.

helm repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories
helm repo list                                          
NAME URL
bitnami https://charts.bitnami.com/bitnami
helm repo update
Update Complete. ⎈Happy Helming!⎈
helm search repo kubewatcNAME             	CHART VERSION	APP VERSION	DESCRIPTION                                       bitnami/kubewatch	3.2.17       	0.1.0      	Kubewatch is a Kubernetes watcher that currentl...h
helm show values bitnami/kubewatch > ~/kubewatch.yaml
slack:
enabled: true
# Slack channel to notify
channel: "slacktest"
# Slack bots token. Create using: https://my.slack.com/services/new/bot
# and invite the bot to your channel using: /join @botname
token: "xoxb-XXXXXXX"
# namespace to watch, leave it empty for watching all.
namespaceToWatch: "default"
# Resources to watch
resourcesToWatch:
deployment: true
replicationcontroller: false
replicaset: false
daemonset: false
services: true
pod: true
job: false
persistentvolume: false
rbac:
create: true
helm install my-kubewatch bitnami/kubewatch --values ~/kubewatch.yam
NAME: my-kubewatchLAST DEPLOYED: Sat Oct 23 08:35:34 2021NAMESPACE: defaultSTATUS: deployedREVISION: 1TEST SUITE: NoneNOTES:CHART NAME: kubewatchCHART VERSION: 3.2.17APP VERSION: 0.1.0
** Please be patient while the chart is being deployed **
To verify that kubewatch has started, run:l
kubectl get deploy -w --namespace default my-kubewatch
NAME READY UP-TO-DATE AVAILABLE AGE
my-kubewatch 0/1 1 0 11s
my-kubewatch 1/1 1 1 16s
kubectl run nginx2 --image=nginx              
pod/nginx2 created
kubectl logs my-kubewatch-5fd7dbf69d-8hjs==> Config file exists...time="2021-10-23T15:35:50Z" level=info msg="Starting kubewatch controller" pkg=kubewatch-podtime="2021-10-23T15:35:50Z" level=info msg="Starting kubewatch controller" pkg=kubewatch-deploymenttime="2021-10-23T15:35:50Z" level=info msg="Processing add to deployment: default/my-kubewatch" pkg=kubewatch-deploymenttime="2021-10-23T15:35:50Z" level=info msg="Processing add to pod: default/my-kubewatch-5fd7dbf69d-8hjsk" pkg=kubewatch-podtime="2021-10-23T15:35:50Z" level=info msg="Kubewatch controller synced and ready" pkg=kubewatch-deploymenttime="2021-10-23T15:35:50Z" level=info msg="Kubewatch controller synced and ready" pkg=kubewatch-podtime="2021-10-23T15:36:03Z" level=info msg="Processing add to pod: default/nginx2" pkg=kubewatch-podtime="2021-10-23T15:36:03Z" level=info msg="Processing update to pod: default/nginx2" pkg=kubewatch-podtime="2021-10-23T15:36:03Z" level=info msg="Processing update to pod: default/nginx2" pkg=kubewatch-pod2021/10/23 15:36:03 Message successfully sent to channel C02JMBPQZP0 at 1635003363.0007002021/10/23 15:36:04 Message successfully sent to channel C02JMBPQZP0 at 1635003363.000800time="2021-10-23T15:36:16Z" level=info msg="Processing update to pod: default/nginx2" pkg=kubewatch-pod2021/10/23 15:36:16 Message successfully sent to channel C02JMBPQZP0 at 1635003376.000900k

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store