Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pulumi/kubespy
Tools for observing Kubernetes resources in real time, powered by Pulumi.
https://github.com/pulumi/kubespy
Last synced: about 13 hours ago
JSON representation
Tools for observing Kubernetes resources in real time, powered by Pulumi.
- Host: GitHub
- URL: https://github.com/pulumi/kubespy
- Owner: pulumi
- License: apache-2.0
- Created: 2018-09-17T17:49:56.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T12:47:44.000Z (8 months ago)
- Last Synced: 2024-12-04T20:12:16.153Z (8 days ago)
- Language: Go
- Homepage: https://pulumi.com/
- Size: 3.14 MB
- Stars: 2,893
- Watchers: 60
- Forks: 92
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Roadmap: ROADMAP.md
Awesome Lists containing this project
- awesome - kubespy - Tools for observing Kubernetes resources in real time, powered by Pulumi. (Go)
- my-awesome-starred - pulumi/kubespy - Tools for observing Kubernetes resources in real time, powered by Pulumi. (Go)
- awesome-repositories - pulumi/kubespy - Tools for observing Kubernetes resources in real time, powered by Pulumi. (Go)
- awesome-eks - kubespy
- awesome-devops - kubespy - Tools for observing Kubernetes resources in real time, powered by Pulumi. https://pulumi.io/ (Kubernetes / Kubernetes // Dashboards, UI, Reporting and Validation)
- awesome-cloud-native - kubespy - Tools for observing Kubernetes resources in real time. (Observability)
README
# kubespy: tools for observing Kubernetes resources in real time
What happens when you boot up a `Pod`? What happens to a `Service` before it is allocated a public
IP address? How often is a `Deployment`'s status changing?**`kubespy` is a small tool that makes it easy to observe how Kubernetes resources change in real
time,** derived from the work we did to make Kubernetes deployments predictable in [Pulumi's CLI](https://www.pulumi.com/kubernetes/). Run `kubespy` at any point in time, and it will watch and report information about a
Kubernetes resource continuously until you kill it.## Examples
`kubespy trace deployment nginx` will "trace" the complex changes a complex Kubernetes resource
makes in the cluster (in this case, a `Deployment` called `nginx`), and aggregate them into a
high-level summary, which is updated in real time.![Changes](images/trace-deployment/trace-deployment-rollout.gif "Changes a Deployment rolls out a new change, in real time")
`kubespy status v1 Pod nginx` will wait for a `Pod` called `nginx` to be created, and then continuously emit changes made to its `.status` field, as syntax-highlighted JSON diffs:
![Changes](images/status.gif "Changes a Pod undergoes as it starts, in real time")
## Installation
You can install kubespy in the following ways:
### Homebrew (Mac)
Prerequisite: [homebrew](https://docs.brew.sh/Installation)
```bash
brew install kubespy
```### Binary
Get the [latest release](https://github.com/pulumi/kubespy/releases),
rename it to `kubespy`, run `chmod +x kubespy` to make it executable and move it in your path (can be /usr/local/bin).### Kubectl Plugin
Prerequisite: kubectl v1.12.0 or later
With kubectl v1.12.0 introducing [easy pluggability](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) of external functions, kubespy can be invoked as `kubectl spy` just by renaming it to `kubectl-spy` and having it available in your path.
### via Golang
Prerequisite: [Go](https://golang.org/) version 1.19 or later
```sh
go install github.com/pulumi/kubespy@latest
```## Usage
`kubespy` has four commands:
- `status [/]`, which in real time emits all changes made to
the `.status` field of an arbitrary Kubernetes resource, as a JSON diff.
- `changes [/]`, which in real time emits all changes to any
field in a Kubernetes resource, as a JSON diff.
- `trace [/]`, which "traces" the changes a complex Kubernetes resource
makes throughout a cluster, and aggregates them into a high-level summary, which is updated in
real time.
- `record [/]`, which in real time emits all changes to any
field in a Kubernetes resource, as a JSON array.Several more commands are planned as well.
## Examples
For a concrete example you can run using either `Pulumi CLI` or `kubectl`, check out [examples/trivial-pulumi-example](https://github.com/pulumi/kubespy/tree/master/examples/trivial-pulumi-example).
## Features
- [x] Supports any resources the API server knows about, including CRDs (_i.e._, uses the discovery
client to discover the available API resources, and allows users to query any of them).
- [x] Displays changes to API objects in real time.
- [ ] Supports case-insensitive aliases (_e.g._ `kubespy status v1 pod ` instead of
`kubespy status v1 Pod `).
- [ ] Supports status updates from regex and/or fuzzy matching (_i.e._, make it easy to watch the
status of `Pod`s generated by `Deployment`s and `ReplicaSet`s).