If I am logged into a host that is running a k3s a...
# k3s
h
If I am logged into a host that is running a k3s agent (node), is there a way to tell what the current running version of k3s is? I know I can run
k3s -v
but that just shows the version of the binary on disk, not necessarily the running version.
k3s kubectl version
requires a kubeconfig (which is problematic in my case), but I also don't think it shows you the version on the currently running node.
c
KUBECONFIG=/var/lib/rancher/k3s/agent/k3scontroller.kubeconfig kubectl get node
the kubeconfig for the agent supervisor process has slightly more permissions than the kubelet
h
Thank you Brandon. That works just fine 👍
c
or also
/proc/$(pidof k3s)/exe --version
will get you closer to what you asked for but this is just a standard Unix thing… you can always use /proc/PID/exe to access the binary for a running process, even if the file has been deleted or overwritten