[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73296":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},73296,"khi","GoogleCloudPlatform\u002Fkhi","GoogleCloudPlatform","A log viewer for Kubernetes troubleshooting","",null,"Go",2066,91,13,20,0,1,10,59.39,"Apache License 2.0",false,"main",[24,25,26,27,28,29],"google-cloud-platform","kubernetes","logging","observability","troubleshooting","visualizer","2026-06-12 04:01:08","\u003Cp style=\"text-align: center;\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\".\u002Fdocs\u002Fimages\u002Flogo-dark.svg\">\n    \u003Cimg alt=\"Kubernetes History Inspector\" src=\".\u002Fdocs\u002Fimages\u002Flogo-light.svg\" width=\"50%\">\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\n\nLanguage: English | [日本語](.\u002FREADME.ja.md)\n\n\u003Chr\u002F>\n\n# Kubernetes History Inspector\n\nKubernetes History Inspector (KHI) is a rich log visualization tool for Kubernetes clusters. KHI transforms vast quantities of logs into an interactive, comprehensive timeline view.\nThis 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.\n\n|Timeline view|Cluster diagram view|\n|---|---|\n|![Timeline view](.\u002Fdocs\u002Fimages\u002Ftimeline.png)|![Cluster diagram](.\u002Fdocs\u002Fimages\u002Fcluster-diagram.png)|\n|Timeline view visualizes resource status change timings with timeline charts and manifest diffs from Kubernetes audit logs.|Cluster diagram visualizes relationships among Kubernetes resources, solely from kube-apiserver audit logs.|\n\n## Why use KHI?\n\n### Insightful Log Visualization\n\nThe key strength of KHI is its ability to visualize logs of numerous activities associated with each Kubernetes resource as timeline-based graphs, moving beyond traditional text-based log analysis. You do not need to manually filter logs by a single resource and chronologically reading through individual activity logs in text data anymore. Instead, you can grasp what happened at a glance directly from the timeline visualization. Also, in addition to log visualization, KHI allows you to review the raw log data for that specific moment in its familiar log format in text, and even examine the YAML manifests at the time the specific event took place. This significantly simplifies the process of pinpointing the root cause of an event.\nKHI can also generate diagrams that depict the state of your Kubernetes cluster's resources and their relationships at a specific point in time. This is invaluable for understanding the status of resources and topology of your cluster at a specific time during an incident.\n\n### Agentless and User friendly\n\nKHI is very easy to set up. It is agentless and allows anyone to easily begin using it without any complicated prior setup on target clusters. Also, KHI enables you to visualize Kubernetes logs through GUI operations. You do not need to write complex queries or commands for log retrieval.\n![Feature: quick and easy steps to gather logs](.\u002Fdocs\u002Fen\u002Fimages\u002Ffeature-query.png)\n\n### Developed from real Log Troubleshooting Experience\n\nKHI is originally developed by the Google Cloud Support team before it became open sourced. It emerged from the practical experience of support engineers, who developed it while analyzing Kubernetes logs in their daily operations. KHI is a tool that takes in their deep expertise in Kubernetes log troubleshooting.\n\n## Supported Products\n\n### Kubernetes cluster\n\n- Google Cloud\n  - [Google Kubernetes Engine](https:\u002F\u002Fcloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fconcepts\u002Fkubernetes-engine-overview)\n  - [Cloud Composer](https:\u002F\u002Fcloud.google.com\u002Fcomposer\u002Fdocs\u002Fcomposer-3\u002Fcomposer-overview)\n  - [GKE on AWS](https:\u002F\u002Fcloud.google.com\u002Fkubernetes-engine\u002Fmulti-cloud\u002Fdocs\u002Faws\u002Fconcepts\u002Farchitecture)\n  - [GKE on Azure](https:\u002F\u002Fcloud.google.com\u002Fkubernetes-engine\u002Fmulti-cloud\u002Fdocs\u002Fazure\u002Fconcepts\u002Farchitecture)\n  - [GDCV for Baremetal](https:\u002F\u002Fcloud.google.com\u002Fkubernetes-engine\u002Fdistributed-cloud\u002Fbare-metal\u002Fdocs\u002Fconcepts\u002Fabout-bare-metal)\n  - [GDCV for VMWare](https:\u002F\u002Fcloud.google.com\u002Fkubernetes-engine\u002Fdistributed-cloud\u002Fvmware\u002Fdocs\u002Foverview)\n\n- Other\n  - kube-apiserver audit logs as JSONlines ([Tutorial](\u002Fdocs\u002Fen\u002Fsetup-guide\u002Foss-kubernetes-clusters.md))\n\n### Logging backend\n\n- Google Cloud\n  - Cloud Logging (For all clusters on Google Cloud)\n\n- Other\n  - Log file upload ([Tutorial](\u002Fdocs\u002Fen\u002Fsetup-guide\u002Foss-kubernetes-clusters.md))\n\n## Getting started\n\n### Run from a docker image\n\n#### Supported environment\n\n- Latest Google Chrome\n- `docker` command\n\n> [!IMPORTANT]\n> We only test KHI with on the latest version of Google Chrome.\n> KHI may work with other browsers, but we do not provide support if it does not.\n\n> [!IMPORTANT]\n> Starting with Chrome 139, CPU-based WebGL emulation is disabled by default in environments without a GPU.\n>\n> If you are running KHI on a remote server without a GPU and connecting via Remote Desktop, timelines may not render correctly.\n> To resolve this, you can override the setting by changing `chrome:\u002F\u002Fflags\u002F#ignore-gpu-blocklist` to `Enabled`.\n>\n> *Note: This does not affect most consumer laptops (even those without dedicated graphics cards), as they typically rely on integrated GPUs (iGPUS).*\n\n#### Run KHI\n\n1. Open [Cloud Shell](https:\u002F\u002Fshell.cloud.google.com)\n1. Run `docker run -p 127.0.0.1:8080:8080 gcr.io\u002Fkubernetes-history-inspector\u002Frelease:latest`\n1. Click the link `http:\u002F\u002Flocalhost:8080` on the terminal and start working with KHI!\n\n> [!WARNING]\n> The container image repository has been moved from `asia.gcr.io` to `gcr.io`. While the old repository is still available, we recommend switching to the new one as the old one will be deprecated in the future.\n\n> [!TIP]\n> 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.\n>\n> **For Linux, MacOS or WSL**\n>\n> ```bash\n> gcloud auth application-default login\n> docker run \\\n>  -p 127.0.0.1:8080:8080 \\\n>  -v ~\u002F.config\u002Fgcloud\u002Fapplication_default_credentials.json:\u002Froot\u002F.config\u002Fgcloud\u002Fapplication_default_credentials.json:ro \\\n>  gcr.io\u002Fkubernetes-history-inspector\u002Frelease:latest\n> ```\n>\n> **For Windows PowerShell**\n>\n> ```bash\n> gcloud auth application-default login\n> docker run `\n> -p 127.0.0.1:8080:8080 `\n> -v $env:APPDATA\\gcloud\\application_default_credentials.json:\u002Froot\u002F.config\u002Fgcloud\u002Fapplication_default_credentials.json:ro `\n> gcr.io\u002Fkubernetes-history-inspector\u002Frelease:latest\n> ```\n\nFor more details, try [Getting started](\u002Fdocs\u002Fen\u002Ftutorial\u002Fgetting-started.md).\n\n### Run from source code\n\n\u003Cdetails>\n\u003Csummary>Get Started (Run from source)\u003C\u002Fsummary>\n\n#### Prerequisites\n\n- Go 1.25.*\n- Node.js environment 22.13.*\n- [`gcloud` CLI](https:\u002F\u002Fcloud.google.com\u002Fsdk\u002Fdocs\u002Finstall)\n- [`jq` command](https:\u002F\u002Fjqlang.org\u002F)\n\n#### Initialization (one-time setup)\n\n1. Download or clone this repository\n  e.g. `git clone https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fkhi.git`\n1. Move to the project root\n  e.g. `cd khi`\n1. Run `make setup` from the project root\n(This make target install npm packages, generate some auto generated code and setup git hooks)\n\n#### Build KHI from source and run\n\n1. [Authorize yourself with `gcloud`](https:\u002F\u002Fcloud.google.com\u002Fdocs\u002Fauthentication\u002Fgcloud)  \n  e.g. `gcloud auth login` if you use your user account credentials\n1. Run `make build`\n1. Run the generated executable with `.\u002Fkhi`\n1. Open `localhost:8080` and start working with KHI!\n\n\u003C\u002Fdetails>\n\n> [!IMPORTANT]\n> Do not expose KHI port on the internet.\n> KHI itself is not providing any authentication or authorization features and KHI is intended to be accessed from its local user.\n\n### Authentication settings\n\n## Settings for Managed Environments\n\n### Google Cloud\n\n#### Permissions\n\nThe following permissions are required or recommended.\n\n- **Required**\n  - `logging.logEntries.list`\n- **Recommended**\n  - These permissions are used to fetch autocomplete candidates in the New Inspection dialog. KHI works without these permissions, but cluster name suggestions will not be displayed.\n    - `monitoring.timeSeries.list`\n    - `container.clusters.list` (Only when using Cloud Composer features)\n- **Setting**\n  - Running KHI on environments with a service account attached, such as Google Cloud Compute Engine Instance: Apply the permissions above to the attached service account.\n  - Running KHI locally or on Cloud Shell with a user account: Apply the permissions above to your user account.\n\n#### Audit Logging\n\n- **No required configuration**\n  KHI fully works with the default audit logging configuration.\n- **Recommended**\n  - Kubernetes Engine API Data access audit logs for `DATA_WRITE`\n\n> [!TIP]\n> Enabling these will log every patch requests on Pod or Node `.status` field.\n> KHI will use this to display detailed container status.\n> KHI will still guess the last container status from the audited Pod deletion log even without these logs, however it requires the Pod to be deleted within the queried timeframe.\n\n- **Setup**\n  1. In the Google Cloud Console, [go to the Audit Logs](https:\u002F\u002Fconsole.cloud.google.com\u002Fiam-admin\u002Faudit) page.\n  1. In the Data Access audit logs configuration table, select  `Kubernetes Engine API` from the Service column.\n  1. In the Log Types tab, select the `Data write` Data Access audit log type\n  1. Click \"SAVE\".\n\n### OSS Kubernetes\n\nRead [Using KHI with OSS Kubernetes Clusters - Example with Loki](\u002Fdocs\u002Fen\u002Fsetup-guide\u002Foss-kubernetes-clusters.md).\n\n## User Guide\n\nRead [user guide](\u002Fdocs\u002Fen\u002Fvisualization-guide\u002Fuser-guide.md).\n\n## Development Contribution Guide\n\nIf you'd like to contribute to the project KHI, read [Contribution Guide](\u002Fdocs\u002Fen\u002Fdevelopment-contribution\u002Fcontributing.md) and then follow [Development Guide](\u002Fdocs\u002Fen\u002Fdevelopment-contribution\u002Fdevelopment-guide.md)\n\n## Disclaimer\n\nPlease 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](https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fkhi\u002Fissues\u002Fnew?template=Blank+issue) and we are happy to check them on best-effort basis.\n","Kubernetes History Inspector (KHI) 是一个用于 Kubernetes 集群故障排查的日志可视化工具。它能够将大量的日志转换为交互式的、全面的时间线视图，帮助用户快速定位和解决跨越多个组件的复杂问题。KHI 的核心功能包括基于时间线的日志图表展示、资源状态变更时间点的可视化以及集群资源关系图的生成，这些都来源于 kube-apiserver 的审计日志。此外，该工具无需安装代理，简化了部署流程，使得用户可以通过简单的GUI操作来查看和分析日志。KHI 适用于需要对 Kubernetes 环境进行深入观察与故障诊断的各种场景，特别是当面对复杂的系统级问题时，能够显著提高排障效率。",2,"2026-06-11 03:44:54","high_star"]