kubedev
kubedev copied to clipboard
can kubedev for linux commands ??
Can we used kubedev for linux commands, or it just for kubectl ??
@4ss3g4f I think its not for linux command (if I didn't miss-understand your question), since kubedev depend heavily and will invoke kubectl as shown in:
- https://github.com/relferreira/kubedev/blob/master/main.go#L81
- https://github.com/relferreira/kubedev/blob/master/main.go#L127
- https://github.com/relferreira/kubedev/blob/master/main.go#L154
Hello @4ss3g4f, @widnyana is right, the command palette will only run kubectl
commands.
What's is your use case?
Hello @4ss3g4f, @widnyana is right, the command palette will only run
kubectl
commands. What's is your use case?
We are implemented baremetal flatcar linux k8s, and our ~/.kube/ path contain pem certificate, but is not the certificate absolute path. k8s api-server updated the pem cetificate and used simlink to point to the latest updated pem cert,
Kubedev complain that it can not find the pem cert, but anyway i was planned to enable kubedev via systemd but due to we used dynamic pem cert i guess i will used securecrt
we used vmware octant also for ~/.kube/ and vmware octant works with dynamic cert, any way thank you for kubedev
@4ss3g4f I don't know much about dynamic certs. I will take a look.
In the meantime, maybe the binary file should run. You can download it on this page: https://github.com/relferreira/kubedev/releases/download/v1.0.0/kubedev_unix
Hope it helps
@relferreira ,
I will provide screenshot to explain, dynamic cert means that kube apiserver cert is not static, it changes and change the cert file name with different time stamp prefix and that changed cert used linux simlink to original /root/.kube/config file
Dear Team,
Here are the scrrenshots:
This is the error:
core@manager-02`` ~ $ docker run --rm -it -v /root/.kube/:/root/.kube/ --net=host relferreira/kubedev:1.0.0
[GIN-debug] [WARNING] Now Gin requires Go 1.6 or later and Go 1.7 will be required soon.
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
panic: invalid configuration: [unable to read client-cert /etc/kubernetes/ssl/kubelet-client-current.pem for default-auth due to open /etc/kubernetes/ssl/kubelet-client-current.pem: no such file or directory, unable to read client-key /etc/kubernetes/ssl/kubelet-client-current.pem for default-auth due to open /etc/kubernetes/ssl/kubelet-client-current.pem: no such file or directory]
goroutine 1 [running]: main.main() /kubedev/main.go:38 +0xc98
sudo cat /root/.kube/config :
here is dynamic cert:
as you can see, kubelet-client-current.pem cert is dynamic adjusting to the latest cert name file,
I don't know why kubedev is not working, vmware octant also used /root/.kube/config file and octant is working properly
Hello @4ss3g4f, thank you for the description, I will take a look.
In the meantime, have you tried the binary version? It uses the same kubectl
of the host, much like the vmware octant
.
The Docker version uses it's own kubectl
, that's why we need to mount the .kube/config
file. Maybe you could try mounting the /etc/kubernetes/ssl
folder too. Something like this:
docker run --rm -it -v /root/.kube/:/root/.kube/ -v /etc/kubernetes/ssl:/root/etc/kubernetes/ssl/ --net=host relferreira/kubedev:1.0.0
@relferreira ,
Still broken,
core@manager-01 ~ $ docker run --rm -it -v /root/.kube/:/root/.kube/ -v /etc/kubernetes/ssl:/root/etc/kubernetes/ssl/ --net=host relferreira/kubedev:1.0.0 Unable to find image 'relferreira/kubedev:1.0.0' locally 1.0.0: Pulling from relferreira/kubedev c9b1b535fdd9: Already exists 7aaa07c63c9e: Pull complete 5f2cd406a22f: Pull complete 5a06da2862b8: Pull complete 9a40370b0a4b: Pull complete Digest: sha256:6038bb85ba3c11b9d057027ddf1efbf29ffef06a3c85a809ddb84c8d746aea02 Status: Downloaded newer image for relferreira/kubedev:1.0.0 [GIN-debug] [WARNING] Now Gin requires Go 1.6 or later and Go 1.7 will be required soon.
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
panic: invalid configuration: [unable to read client-cert /etc/kubernetes/ssl/kubelet-client-current.pem for default-auth due to open /etc/kubernetes/ssl/kubelet-client-current.pem: no such file or directory, unable to read client-key /etc/kubernetes/ssl/kubelet-client-current.pem for default-auth due to open /etc/kubernetes/ssl/kubelet-client-current.pem: no such file or directory]
goroutine 1 [running]: main.main() /kubedev/main.go:38 +0xc98