Container that displays informations about the Pod it's running on
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd
data
k8s
kube
middleware
.dockerignore
.env
.gitignore
Dockerfile
Dockerfile.arm64
Gopkg.lock
Gopkg.toml
README.md
bindata.go
info_handler.go
logo_handler.go
template.go
util.go
visit.go

README.md

Podstalk

Container that displays informations about the Pod it's running on.

Usage

kubectl create namespace podstalk && \
kubectl -n podstalk apply -f https://github.com/mhutter/podstalk/raw/master/kube/daemonset.yml

Will create a daemonset running mhutter/podstalk and a service named podstalk, along with a Role and a Rolebinding required to list pods in the namespace.

Customization

The following env vars can be set to customize Podstalk:

  • TITLE (default: Podstalk) - <title> of the HTML page
  • BASE_PATH (default: "") - Base path of the app, used for asset serving

Development

To regenerate bindata.go, do:

go-bindata -pkg podstalk -prefix data/ data/*

For local development I recommend using gin:

gin --build cmd/podstalk

This will run podstalk on http://localhost:3000/ and reload each time a go file is changed.

To use with minikube you can do the following:

# delploy podstalk into minikube
kubectl create namespace podstalk
kubectl -n podstalk apply -f kube/deployment.yml
kubectl -n podstalk expose svc/podstalk --type NodePort --name podstalk-ext

# set `imagePullPolicy` to `IfNotPresent`
kubectl -n podstalk edit deployment podstalk

# Connect to the minikube docker daemon
eval $(minikube docker-env)

# build the image (each time you changed the code)
docker build -t mhutter/podstalk .

# restart all pods (each time you built a new image)
kubectl -n podstalk delete pod -l app=podstalk

# access podstalk in the browser
minikube -n podstalk service podstalk-ext