Based on the KubeView README, I tried to run KubeView using the container provided here.
I run:
$ docker run --publish-all --name kubeview ghcr.io/benc-uk/kubeview:0.1.31
I get the following output:
2023/03/12 18:06:45 ### Kubeview v0.1.31 starting...
2023/03/12 18:06:45 ### Connecting to Kubernetes...
2023/03/12 18:06:45 ### Creating client with config file: /.kube/config
panic: stat /.kube/config: no such file or directory
goroutine 1 [running]:
main.main()
/build/cmd/server/main.go:60 +0x6a5
I can see that the problem is that the tool is looking for the kubeconfig file in /.kube/config
. It can't find it because mine is in my home directory, ~/.kube/config/
I tried to pass an environment variable like this:
$ docker run --publish-all --name kubeview -e KUBECONFIG=/Users/<MY_USERNAME>/.kube/config ghcr.io/benc-uk/kubeview:latest
It didn't work. Has anyone been able to run KubeView
as a container? I'm on a Mac.