Simple kubernetes dashboard for demos (written in Python3 - inspired by https://github.com/weibeld/k1s)
This is the preferred way to run k1s.py - with the best interactivity.
Make sure you have Python3 and the Python Kubernetes client installed.
sudo apt-get update
sudo apt-get install -y python3 python3-pip
python3 -m pip install kubernetes
Note:: A safer option is to create a Python .venv environment.
./k1s.py
./k1s.py pods
./k1s.py po,pv,pvc
This mode is included more as an exercise to demonstrate the use of ServiceAccounts and RBAC rules.
kubectl create -f kubectl_run_k1spy.yaml
Note: the RBAC rules allow access to the default Namespace only - you may want to create RoleBindings for other Namespaces
If all is well you should see something like the following:
Context: in-cluster / Namespace: default / Resources: all
services:
kubernetes 10.96.0.1 ClusterIP Pending 443/TCP eps:1/1 2d02h14m58s
pods:
k1spy 1/1 Running 192.168.80.234 /w2 12m22s [mjbright/k1spy]
You will see a display similar to the log output, which updates over time.
Note: k1s.py can be slow to update when accessed via attach