https://github.com/mhutter/podstalk
Container that displays informations about the Pod it's running on
https://github.com/mhutter/podstalk
Last synced: over 1 year ago
JSON representation
Container that displays informations about the Pod it's running on
- Host: GitHub
- URL: https://github.com/mhutter/podstalk
- Owner: mhutter
- License: mit
- Created: 2018-04-28T13:36:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-21T13:23:40.000Z (about 7 years ago)
- Last Synced: 2024-05-01T21:07:45.979Z (about 2 years ago)
- Language: Go
- Homepage: https://hub.docker.com/r/mhutter/podstalk/
- Size: 319 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Podstalk
Container that displays informations about the Pod it's running on.
## Usage
```sh
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`_) - `` of the HTML page
* `BASE_PATH` (_default: `""`_) - Base path of the app, used for asset serving
## Development
To regenerate bindata.go, do:
```sh
go-bindata -pkg podstalk -prefix data/ data/*
```
For local development I recommend using [gin][]:
```sh
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:
```sh
# 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
```
[gin]: https://github.com/codegangsta/gin
[minikube]: https://kubernetes.io/docs/getting-started-guides/minikube/