Azure / Azure/kdebug

Project overview

オープン
#1 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
vision
主要言語
Go
スター
54
フォーク
21
PR マージ指標
30日以内にマージされた PR はありません

説明

# Summary

Develop an app running in Kubernetes is not easy. Managing a Kubernetes cluster is even harder. It takes years of experience to understand how Kubernetes works, how to read logs from different components and where to start when some part of your cluster are not working.

This projects aims to create a simple tool to run diagnostics and gives advices for your troubleshooting direction in ops scenario.

# Goals

* A handy ops tool for troubleshooting Kubernetes and apps in it

# Non-Goals

* Deep integration with app development flow
* Debug Kubernetes itself

# User Experience

At early stage it should be a CLI tool with minimum dependencies.

## Check sub command

Check sub command is used to run specific check suites.

For example, following command runs DNS and HTTP check suites:

```bash
kdebug check -s dns,http,kube,app
```

It generates a report after checks complete.

An example for healthy report:
```
* DNS
=> [OK] System DNS
=> [OK] In-cluster CoreDNS
=> [OK] Azure DNS
=> [OK] Google DNS
* HTTP
=> [OK] Connectivity to kube-apiserver
=> [OK] Connectivity to google.com
* Kubernetes
=> [OK] Kubelet is running
* Apps
=> [OK] All pods are running

All OK.
```

An example for unhealthy report:

```
* DNS
=> [OK] System DNS
=> [Fail] In-cluster CoreDNS
=> [OK] Azure DNS
=> [OK] Google DNS
* HTTP
=> [OK] Connectivity to kube-apiserver
=> [OK] Connectivity to google.com
* Kubernetes
=> [Fail] Kubelet liveness
* Apps
=> [Fail] Pods Crashloopbackoff

kdebug has detected these problems for you:

----------
Checker: In-cluster CoreDNS
Error: Time-out
Description: In-cluster CoreDNS query failed. Check if CoreDNS pods are running.
Recommendations:
Check CoreDNS pods using command ` kubectl get pods -o wide -n kube-system | grep coredns`
Help links:
https://example.com

----------
Checker: Kubelet
Error: systemd service kubelet is not running
Description: Systemd service kubelet is not running. It has crashed 300 times in last 1h.
Logs:
[I] xxx
[I] yyy
[F] cgroup is invalid.
...
Recommendations:
Use `systemctl status kubelet` to check its status.
Use `journactl -r -u kubelet` to see full logs.
Reboot machine.
Help links:
https://foo.com
https://bar.com

----------
Checker: App
Error: Pod default/xxx is in Crashloopbackoff state
Description: Pod is crashing. Last exit reason is OOM
Recommendations:
Increase pod memory limit. Current is 100MB.
Check potential memory leak in your app.
Help links:
https://foo.com
https://bar.com
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、提案されている CLI のユーザーエクスペリエンスを確認します。特に、`check` サブコマンドと、その DNS、HTTP、Kubernetes、app の各チェックスイートを確認してください。issue では、ファイル、テスト、エントリポイントは特定されていません。完了には、スコープが決定され、説明されている正常および異常のレポートを生成する診断ツールが実装されている必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go, kubernetes
領域
cli, devops
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。