Categorygithub.com/k8sgpt-ai/go-custom-analyzer
modulepackage
0.0.0-20250203120607-a63cc726e97e
Repository: https://github.com/k8sgpt-ai/go-custom-analyzer.git
Documentation: pkg.go.dev

# README

go-custom-analyzer

This is an example of how to extend k8sgpt analyzer with a custom implementation. This enables you to run additional behaviours outside of Kubernetes or with different languages.

See the related tutorial

How to run

You will need to run this example locally. This example is hard coded to port 8085. e.g.

go run main.go

Trigger it through grpcurl. e.g.

❯ grpcurl --plaintext localhost:8085 schema.v1.AnalyzerService/Run
{
  "result": {
    "name": "example",
    "error": [
      {
        "text": "This is an example error message!"
      }
    ],
    "details": "example"
  }
}

Calling from K8sGPT

When you have this service ready to go and running somewhere. Add it to the K8sGPT custom-analysis config

❯ cat ~/Library/Application\ Support/k8sgpt/k8sgpt.yaml
custom_analyzers:
  - name: Example
    connection:
      url: localhost
      port: 8085

# Packages

No description provided by the author