ry's Tech blog

Cloud Native技術などについて書いていきます。

Kubenews #45

2021-01-28

Detect crashes in your Kubernetes cluster using kwatch and Slack (click here to source)

kwatchは、KubernetesK8sクラスターのすべての変更を監視して、実行中のアプリのクラッシュを検出し、お気に入りのチャネル(Slack、Discordなど)に通知を公開することを目的としたオープンソースのツール。

Example

  • Slack のIncoming WebhookのURLを取得。

  • 構成ファイル用のConfigmapのテンプレートの取得。

curl  -L https://raw.githubusercontent.com/abahmed/kwatch/v0.3.0/deploy/config.yaml -o config.yaml
  • 編集及び適用
apiVersion: v1
kind: Namespace
metadata:
  name: kwatch
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: kwatch
  namespace: kwatch
data:
  config.yaml: |
    alert:
      slack:
        webhook: WEBHOOK_URL
kubectl apply -f config.yaml
  • Slackに通知を投げるAgentの作成
kubectl apply -f https://raw.githubusercontent.com/abahmed/kwatch/v0.3.0/deploy/deploy.yaml

Tracing the path of network traffic in Kubernetes (click here to source)

この記事では、Kubernetesクラスターの内外でパケットがどのように流れるかを解説してくれています。