fix diags to diag

Signed-off-by: Forest-L <lilin@yunify.com>
This commit is contained in:
Forest-L 2021-01-20 11:50:28 +08:00
parent 701980d198
commit d2ce28e6a8
2 changed files with 21 additions and 21 deletions

View File

@ -26,7 +26,7 @@ ke install npd
```
- Run kubeye
```shell
root@node1:# ke diags
root@node1:# ke diag
NODENAME SEVERITY HEARTBEATTIME REASON MESSAGE
node18 Fatal 2020-11-19T10:32:03+08:00 NodeStatusUnknown Kubelet stopped posting node status.
node19 Fatal 2020-11-19T10:31:37+08:00 NodeStatusUnknown Kubelet stopped posting node status.
@ -157,7 +157,7 @@ customChecks:
- Save the above rule as a yaml, for example, `rule.yaml`.
- Run kubeye with `rule.yaml`
```shell
root:# ke diags -f rule.yaml --kubeconfig ~/.kube/config
root:# ke diag -f rule.yaml --kubeconfig ~/.kube/config
NAMESPACE SEVERITY NAME KIND TIME MESSAGE
default Warning nginx Deployment 2020-11-27T17:18:31+08:00 [imageFromUnauthorizedRegistry]
kube-system Warning node-problem-detector DaemonSet 2020-11-27T17:18:31+08:00 [livenessProbeMissing runAsPrivileged]

View File

@ -26,7 +26,7 @@ var config string
var allInformation bool
var auditCmd = &cobra.Command{
Use: "diags",
Use: "diag",
Short: "diagnostic information from the cluster",
Run: func(cmd *cobra.Command, args []string) {
err := validator.Cluster(config, cmd.Context(), allInformation)