khi

module
v0.57.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0

README

Kubernetes History Inspector

Language: English | 日本語
GitHub Release PR Tests License

Kubernetes History Inspector Demo


Kubernetes History Inspector

Kubernetes History Inspector (KHI) is a rich log visualization tool for Kubernetes clusters. KHI transforms vast quantities of logs into an interactive, comprehensive timeline view. This makes it an invaluable tool for troubleshooting complex issues that span multiple components within your Kubernetes clusters. Also, KHI is agentless, allowing anyone to access its features without a complicated process.

Timeline view Topology view
Timeline view

Timeline view visualizes resource status change timings with timeline charts and manifest diffs from Kubernetes audit logs.

Topology view

Topology view visualizes relationships among Kubernetes resources, solely from kube-apiserver audit logs.

Getting started

The easiest way to try KHI is using Cloud Shell, where the metadata server is available without requiring initial credential setup.

Running in Cloud Shell
  1. Open Cloud Shell

  2. Run the following command:

    docker run -p 127.0.0.1:8080:8080 gcr.io/kubernetes-history-inspector/release:latest
    
  3. Click the link http://localhost:8080 on the terminal and start working with KHI!

Running in environment without a metadata server (Local PC, etc.)

If you want to run KHI in an environment where the metadata server is not available, you can use Application Default Credentials (ADC) by mounting your ADC file from your host filesystem to the container.

For Linux, MacOS or WSL
gcloud auth application-default login
docker run \
 -p 127.0.0.1:8080:8080 \
 -v ~/.config/gcloud/application_default_credentials.json:/root/.config/gcloud/application_default_credentials.json:ro \
 gcr.io/kubernetes-history-inspector/release:latest
For Windows PowerShell
gcloud auth application-default login
docker run `
-p 127.0.0.1:8080:8080 `
-v $env:APPDATA\gcloud\application_default_credentials.json:/root/.config/gcloud/application_default_credentials.json:ro `
gcr.io/kubernetes-history-inspector/release:latest

Supported Products & Environments

Kubernetes cluster
Logging backend
  • Google Cloud

    • Cloud Logging (For all clusters on Google Cloud)
  • Other

Supported environment
  • Latest Google Chrome
  • docker command

[!IMPORTANT] We only test KHI on the latest version of Google Chrome. KHI may work with other browsers, but we do not provide support if it does not.

Environment Setup Guide

Google Cloud

Read Google Cloud Permissions & Configuration Guide.

OSS Kubernetes

Read Using KHI with OSS Kubernetes Clusters - Example with Loki.

User Guide

Read user guide.

Development Contribution Guide

If you'd like to contribute to the project KHI, read Contribution Guide and then follow Development Guide

Disclaimer

Please note that this tool is not an officially supported Google Cloud product. If you find any issues and have a feature request, file a Github issue on this repository and we are happy to check them on best-effort basis.

[!IMPORTANT] Do not expose KHI port on the internet. KHI itself is not providing any authentication or authorization features and KHI is intended to be accessed from its local user.

Directories

Path Synopsis
cmd
internal
pkg
common/typeddict
Package typeddict provides a generic, concurrent, type-safe dictionary.
Package typeddict provides a generic, concurrent, type-safe dictionary.
core/inspection/logger
TODO: move logger feature on task.
TODO: move logger feature on task.
core/inspection/logutil
Package logutil provides log-related utilities used by multiple log processing tasks, such as parsers for different log string formats and log string converters.
Package logutil provides log-related utilities used by multiple log processing tasks, such as parsers for different log string formats and log string converters.
core/inspection/taskbase
Inventory related tasks defined in this file provides a framework for discovering and merging inventory data from various sources.
Inventory related tasks defined in this file provides a framework for discovering and merging inventory data from various sources.
model/khifile/v6
Package khifilev6 provides models and utilities for KHI file format version 6.
Package khifilev6 provides models and utilities for KHI file format version 6.
task/inspection/googlecloudlogcomputeapiaudit/contract
Package googlecloudlogcomputeapiaudit_contract defines the contract for the googlecloudlogcomputeapiaudit task.
Package googlecloudlogcomputeapiaudit_contract defines the contract for the googlecloudlogcomputeapiaudit task.
task/inspection/googlecloudlogcomputeapiaudit/impl
Package googlecloudlogcomputeapiaudit_impl defines the implementation of the googlecloudlogcomputeapiaudit task.
Package googlecloudlogcomputeapiaudit_impl defines the implementation of the googlecloudlogcomputeapiaudit task.
task/inspection/googlecloudloggkeautoscaler/contract
Package googlecloudloggkeautoscaler_contract contains the task IDs for the GKE autoscaler tasks.
Package googlecloudloggkeautoscaler_contract contains the task IDs for the GKE autoscaler tasks.
task/inspection/googlecloudlogk8scontrolplane/contract
Package googlecloudlogk8scontrolplane_contract defines the contract for tasks related to GKE control plane component logs.
Package googlecloudlogk8scontrolplane_contract defines the contract for tasks related to GKE control plane component logs.
task/inspection/googlecloudlogk8sevent/contract
package googlecloudlogk8sevent_contract defines the task IDs for Kubernetes Event Log inspection.
package googlecloudlogk8sevent_contract defines the task IDs for Kubernetes Event Log inspection.
task/inspection/googlecloudlogk8snode/contract
Package googlecloudlogk8snode_contract defines the contract for the googlecloudlogk8snode task.
Package googlecloudlogk8snode_contract defines the contract for the googlecloudlogk8snode task.
task/inspection/googlecloudlogk8snode/impl
This package provides inspection tasks for Kubernetes node logs from Google Cloud Logging.
This package provides inspection tasks for Kubernetes node logs from Google Cloud Logging.
task/inspection/googlecloudlognetworkapiaudit/contract
package googlecloudlognetworkapiaudit_contract defines the task IDs for the googlecloudlognetworkapiaudit inspection tasks.
package googlecloudlognetworkapiaudit_contract defines the task IDs for the googlecloudlognetworkapiaudit inspection tasks.
scripts
backend-codegen command
fontlist-gen command

Jump to

Keyboard shortcuts

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