kubewatch

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

README

kubewatch

Version Widget License Widget GoReportCard Widget Travis Widget DockerHub Widget

Kubernetes API event watcher.

Install
go get -u github.com/softonic/kubewatch
Shell completion
eval "$(kubewatch --completion-script-${0#-})"
Help
kubewatch --help
usage: kubewatch [<flags>] <resources>...

Watches Kubernetes resources via its API.

Flags:
  -h, --help          Show context-sensitive help (also try --help-long and --help-man).
      --kubeconfig    Absolute path to the kubeconfig file.
      --namespace     Set the namespace to be watched.
      --flatten       Whether to produce flatten JSON output or not.
      --version       Show application version.

Args:
  <resources>  Space delimited list of resources to be watched.
Out-of-cluster examples:

Watch for pods and events in all namespaces:

kubewatch pods events | jq '.'

Same thing with docker:

docker run -it --rm \
-v ~/.kube/config:/root/.kube/config \
softonic/kubewatch pods events | jq '.'

Watch for services events in namespace foo:

kubewatch --namespace foo services | jq '.'

Same thing with docker:

docker run -it --rm \
-v ~/.kube/config:/root/.kube/config \
softonic/kubewatch --namespace foo services | jq '.'
In-cluster examples:

Run kubewatch in the monitoring namespace and watch for pods in all namespaces:

kubectl --namespace monitoring run kubewatch --image softonic/kubewatch -- pods

Run kubewatch in the monitoring namespace and watch for pods, deployments and events objects in all namespaces. Also flatten the json output:

kubectl --namespace monitoring \
run kubewatch --image softonic/kubewatch \
-- --flatten pods deployments events

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL