-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Docker support. #1
base: main
Are you sure you want to change the base?
Conversation
Thank you for your addition, appreciate it, the only thing I did not get is - it is an single index.html file repo, do we really need all this? In my imagination docker is used to avoid installation of software and/or running it in isolation - but here we are not installing anything technically so I am not sure if I understand what problem do we solve e.g. if you want to run it without installing kubectl itself it may be done something like this docker run -it --rm -p 8001:8001 \
-v /Users/mac/Downloads/dev.yml:/.kube/config \
-v /Users/mac/github.com/mac2000/notlens/index.html:/notlens/index.html \
-w /notlens \
bitnami/kubectl:1.25 proxy --address=0.0.0.0 -w . notes around docker file:
even if we decide to keep it, it theoretically may be as simple as: FROM bitnami/kubectl
WORKDIR /notlens
COPY index.html .
CMD ["proxy", "--address=0.0.0.0", "-w", "."] but still with coveats mentioned above and the very last one - not sure if/how someone may benefit from makefile and dockerfile in repo, aka even if we decide to create docker - probably it will be better to publish it so it can be used out of the box
PS: makefile won't work in some cases, e.g. for example my |
l think ur right, I didn't take into account the situation of kubelogin. There are several reasons why I do this (maybe it's really unnecessary XD):
I didn't think too much, haha, its my problem. Indeed, the kubeconfig file should be mounted into docker instead of copying into docker, otherwise it is not safe. I think it would be more convenient to provide a Docker image, (Although this project is very simple, only one index. html. lamo.) Just a small proposal. Sorry for my poor English. |
I would extend your idea further: what if notlens can be hosted right inside kubernetes and be covered by some kind of auth (aka oauth2-proxy), with this in place - there is: no need to install anything locally, tool can be used by any engineer and non engineer to observe logs The only caveat here is that in real clusters it may be unusable because of amount of deployed stuff - ok, in my local kind playground there are 10..20 pods, but in dev cluster there are 1000 for this things we use grafana loki I am thinking about this - because inside kuberenetes we actually do not need kubectl nor kubelogin at all we may directly talk to kubernetes api to retrieve logs And exactly to accomplish this - all we need (theoretically) is nginx image, pass nginx.conf with upstream being set to kubernetes api and index.html file and it should work and for auth there are basic auth annotations built in or oauth2-proxy or dex for something more complex with this in place will it solve what you have described? |
What you said is very comprehensive, vey looking forward to the future development. But I think it's better to keep it simple. As you said, in the production env, we have ELFK and Loki to collect real-time logs, so we dont need this. However, it is very useful for small self-host clusters such as k3s/minikube. Running in the k8s is probably the best way. You can destroy it directly after use, and as you said, there is no need to worry about permission issues, which is very convenient |
No description provided.