Open milindchawre opened 4 years ago
There were couple of things missing. Thanks @bboreham for pointing out different options to override the cri endpoint. I need to make these changes to make the containers probing worked. Now I can see containers in weavescope UI.
- '--probe.docker=false'
- '--weave=false'
- '--probe.cri=true'
- '--probe.cri.endpoint=unix:///var/run/k3s/containerd/containerd.sock'
👆 These options were crucial. Disabling docker probe and enabling cri probe. In the end, pointing to your CRI endpoint.
So if docker.sock
is not present on your system then find socket file location for corresponding container runtime in my case its containerd.sock
. Then override the CRi endpoint to point to this new socket file using above options.
Containers probing is working fine, but still weavescope is giving some RBAC errors.
2020-07-02T02:03:03.446759501+09:00 <probe> WARN: 2020/07/01 17:03:03.446413 Error Kubernetes reflector (namespaces), backing off 1m20s: github.com/weaveworks/scope/probe/kubernetes/client.go:279: Failed to list *v1.Namespace: namespaces is forbidden: User "system:serviceaccount:weave:weave-scope" cannot list resource "namespaces" in API group "" at the cluster scope
I am getting this error on following above steps.
Error generating CRI report: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial unix /var/run/k3s/containerd/containerd.sock: connect: no such file or directory"
In terminal, this is working. sudo crictl -r "unix:///var/run/k3s/containerd/containerd.sock" version
Version: 0.1.0 RuntimeName: containerd RuntimeVersion: v1.5.8-k3s1 RuntimeApiVersion: v1alpha2
Can you try modifying the DaemonSet to mount that path inside the container?
BUG REPORT
What you expected to happen?
Expecting weavescope to work on k3s.
What happened?
weave-scope-cluster-agent
pod.weave-scope-agent
pod.How to reproduce it?
Versions: