scope icon indicating copy to clipboard operation
scope copied to clipboard

Weave Scope not support containerd in GKS

Open draconiun opened this issue 4 years ago • 1 comments

Hi, I currently have a kubernetes cluster deployed on GCP. The version is 1.19 and as an image type I use containerd. I have deployed weave scope version 1.13 and it does not show me the containers in the panel. And it is important to be able to visualize the CPU / Memory of my pods.

image

Pool in GKS:

image

I have checked this Weave Scope repository for CRI I tried to implement it but it still doesn't work. https://github.com/weaveworks/scope/blob/master/examples/cri/ds.yaml

I will be grateful for your responses. Thank you.

draconiun avatar Jul 14 '21 23:07 draconiun

I had a go at this today. (Sorry it is a long time since you asked!)

GKE, at least when I tested it today, is running containerd, and the CRI socket can be accessed at /var/run/containerd/containerd.sock. Therefore you need to change this argument on the agent:

            - '--probe.cri.endpoint=unix:///var/run/containerd/containerd.sock'

You need to mount this path from the host into the container, like this:

          volumeMounts:
            - name: cri-socket
              mountPath: /var/run/containerd/containerd.sock
      volumes:
        - name: cri-socket
          hostPath:
            path: /var/run/containerd/containerd.sock
            type: Socket

Once I did that, Scope knew about my containers, however it thought they were all stopped. I can make a PR to fix that.

(Also that ds.yaml file is out of date in other ways; it should use --probe.kubernetes.role=host and run a separate probe for Kuebrnetes like in the k8s directory)

bboreham avatar Feb 28 '22 17:02 bboreham