MCPcopy Index your code
hub / github.com/alitari/kubexp

github.com/alitari/kubexp @0.9.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.9.0 ↗ · + Follow
366 symbols 989 edges 17 files 31 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

kubexp (KubeExplorer)

CircleCI codecov

kubexp is a console user interface for kubernetes.

drwing

Features

  • automatic update view when cluster changes
  • switch cluster
  • resource details and incremental search
  • following container logs
  • exec into container
  • pod port-forward
  • upload/download files to container
  • scale deployments, replicasets etc.
  • delete resources

Installation

You need a shell with access to kubernetes through kubectl. Kubexp uses the same configuration file (usually ~.kube/config) to connect to the k8s cluster(s).

rbac

Your service account must have a rolebinding to cluster admin in each k8s cluster. The file rbac-default-clusteradmin.yaml contains the according clusterrolebinding for the default service account:

kubectl apply -f rbac-default-clusteradmin.yaml

Option 1: get executable

Go to releases page and download the binary for your platform.

KUBEXP_RELEASE="0.8.1"
wget https://github.com/alitari/kubexp/releases/download/${KUBEXP_RELEASE}/kubexp
chmod +x kubexp

Option 2: running with docker

To run the kubexp container you need to mount the config file. Note, that when kubexp runs in a container the port-forward feature will not work.

KUBEXP_RELEASE="0.8.1"
docker run -it -v ~/.kube/config:/root/.kube/config alitari/kubexp:${KUBEXP_RELEASE}

Hints

  • use arrow keys to navigate and return key to toggle between the item list and item details
  • to get help in the user interface type 'h'
  • hit Space-Key to reconnect when resource is OFFLINE
  • resources in the menu are organized in categories, hit 'r' to change the category
  • get command line options with kubexp -help

building and running

set the GOOS environment variable according your os

# setup development environment
SRCDIR=${GOPATH:-${HOME}/go}/src/github.com/alitari/ && mkdir -p $SRCDIR && cd $SRCDIR
git clone https://github.com/alitari/kubexp.git && cd kubexp
# fetch dependencies
go get -v -t -d ./...

export GOOS="linux"
# export GOOS="windows"
# build executable
./build.sh bin
# execute linux
bin/kubexp
# execute windows
# bin/kubexp.exe

# execute tests
go test main/..

Credits

  • GOCUI go framework for console user interfaces

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

bindKey
called by 71
commands.go
colorizeText
called by 29
widgets.go
val1
called by 28
templates.go
String
called by 21
quantity.go
tpl
called by 20
templates.go
setContent
called by 15
widgets.go
addSuffix
called by 15
suffix.go
setState
called by 15
ui.go

Shape

Function 212
Method 115
Struct 35
Interface 2
TypeAlias 2

Languages

Go100%

Modules by API surface

templates.go85 symbols
backend.go58 symbols
ui.go54 symbols
widgets.go44 symbols
config.go22 symbols
template_test.go19 symbols
quantity.go18 symbols
widgets_test.go16 symbols
suffix.go13 symbols
commands.go12 symbols
filebrowser.go9 symbols
kubeproxy.go7 symbols

For agents

$ claude mcp add kubexp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact