Skip to main content

A kubectl plugin for viewing Kubernetes events

Project description

kge-kubectl-get-events

A kubernetes utility for viewing pod events in a user-friendly way. There are many problems that are most easily fixed by understand the recent events for the pods. The best alternative to this tool is:

alias kge="kubectl get events --sort-by=lastTimestamp --field-selector type!=Normal"

Table of Contents

Installation

pipx install kge-kubectl-get-events

Usage

View Events for All Pods

View events for all pods in the current namespace:

kge -A
# or
kge --all

View Events for a Specific Pod

View events for a specific pod:

kge <pod-name>

View Non-Normal Events

View only non-normal events (warnings and errors) for all pods:

kge --non-normal
# or
kge -n

In interactive mode, you can select "All pods with non-normal events" from the menu.

Interactive Mode

Run the tool without arguments to enter interactive mode:

kge

This will display a menu of all pods in the current namespace, allowing you to select which pod's events to view. The menu includes an option to view all non-normal events.

Shell Completion

The tool supports shell completion for pod names. To enable it:

For zsh

Add the following to your shell configuration:

source <(kge --completion=zsh)

Alternatively, add the completion script directly to your zsh configuration:

compdef _kge kge
_kge() {
    local -a pods
    pods=($(kge --complete))
    _describe 'pods' pods
}

Command-line Options

Option Description
-A, --all Get events for all pods in the current namespace
-n, --non-normal Show only non-normal events (warnings and errors)
--complete List pods for shell completion (internal use)
--completion=zsh Generate zsh completion script

Features

  • View events for all pods in a namespace
  • View events for a specific pod
  • View only non-normal events (warnings and errors)
  • Interactive pod selection
  • Shell completion support
  • Automatic namespace detection
  • Caching for better performance

Requirements

  • Python 3.6 or higher
  • Kubernetes Python client
  • kubectl configured with access to a Kubernetes cluster

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.1.7.tar.gz (6.1 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.1.7-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kge_kubectl_get_events-0.1.7.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for kge_kubectl_get_events-0.1.7.tar.gz
Algorithm Hash digest
SHA256 ba91da63d4dcba900ce6d3d48443fc69791d1e20cc2990a82562946e6ef9ac61
MD5 c56db0ade1fb83b4cdab43567e3931a1
BLAKE2b-256 86329b40b3e2d56e04346c0aea8fcca32d64ddfb1772e341f846a3f1223f370e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kge_kubectl_get_events-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6bc72ae3019aff471e1c1b5411aa847ea876646c1bbaeda5f310fccc1db0bd98
MD5 becd29217ba6d5c1cf2e1b9a9b6ce160
BLAKE2b-256 b1014a981b42e894d3ee629f55b6b35736ecd45b8068c0e9df0f6e8adfee4274

See more details on using hashes here.

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