Skip to main content

Kubernetes utility for viewing pod and failed replicaset events

Project description

kge - Kubernetes Events Viewer

Python Version License: MIT PyPI

A simple yet powerful CLI tool for viewing and monitoring Kubernetes events with a focus on readability and ease of use. kge provides an intuitive interface to quickly diagnose issues.

Table of Contents

Features

  • 🔍 View events for specific pods
  • 👻 Find missing pods because of missing serviceAccounts or volumes
  • 📊 View all events in a namespace
  • ⚠️ Filter to show only non-normal events
  • 🖱️ Interactive pod selection
  • 🎨 Color-coded output
  • ⌨️ Shell completion support (zsh)
  • 🔄 View events for any Kubernetes resource type (Pods, Deployments, CRDs, etc.)

Installation

A brew formula is a WIP. Until then, use pipx. Which can be installed with brew install pipx Pipx is like brew, only for python.

# Install using pipx (recommended)
pipx install kge-kubectl-get-events
# Or install using pip, but not as easy
pip install kge-kubectl-get-events

Usage

Basic Usage

View events for a specific pod:

kge <pod-name>

View all events in the current namespace:

kge -a

View only non-normal events:

kge -e

Combine flags to view all non-normal events in the current namespace:

kge -ea

View events in a specific namespace:

kge -n <namespace>

Viewing Events for Any Resource Type

View events for a specific resource type:

kge -k <kind> <resource-name>

Interactive Mode

Run without arguments for interactive pod selection:

kge

Check a different namespace than your current context:

kge -n kubecost

Shell Completion

Enable zsh completion:

source <(kge --completion=zsh)

Completion features:

  • Tab completion for namespaces after -n
  • Tab completion for pods after -n <namespace>
  • Tab completion for kinds after -k
  • Tab completion for resources of a specific kind after -k <kind>

Examples

View non-normal events for all pods in a namespace:

kge -ea

View events for a specific pod in a specific namespace:

kge -n my-namespace my-pod

View events for a Deployment:

kge -k Deployment my-deployment

Known Issues

  • Not all arguments work together. For example, kge -e -k Deployment will not work. For complex queries, use kge -a to see all events and filter with grep or another tool.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kge_kubectl_get_events-0.9.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kge_kubectl_get_events-0.9.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file kge_kubectl_get_events-0.9.0.tar.gz.

File metadata

  • Download URL: kge_kubectl_get_events-0.9.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kge_kubectl_get_events-0.9.0.tar.gz
Algorithm Hash digest
SHA256 c3de4bcd44f3843c39df9b91e5f68fff622daa950a87b51e3562e8c4028cb091
MD5 a0ee478c7a5cabe2d6b6b17d979a3164
BLAKE2b-256 36c516fb1230e239bc2a7c2079935fe5af5e4519af305ef8e534303422eeeaf1

See more details on using hashes here.

Provenance

The following attestation bundles were made for kge_kubectl_get_events-0.9.0.tar.gz:

Publisher: python-publish.yaml on jessegoodier/kge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kge_kubectl_get_events-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kge_kubectl_get_events-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afa3d26a2b2777b7cd90ef327f2f2947e9eb065e8adab72fb5ad41405a91aa67
MD5 fe7d94e5358a5b26bed45e16696fddf8
BLAKE2b-256 a259df3a5c12f3af5a430182e76ded14e1df527eab0d37b29d79f0ca5c675143

See more details on using hashes here.

Provenance

The following attestation bundles were made for kge_kubectl_get_events-0.9.0-py3-none-any.whl:

Publisher: python-publish.yaml on jessegoodier/kge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page