With the relase of windows server 2019 and OS-version 1809 it's now supported to mount the named pipe as volume. This opens up to connect to the Docker API on the container host from the running container.
Could this open up for cadvisor to support windows containers?
https://stefanscherer.github.io/docker-on-windows-server-2019/
https://blog.sixeyed.com/what-you-can-do-with-docker-in-windows-server-2019-that-you-couldnt-do-in-windows-server-2016/
+1
That was certainly one reason we didn't support windows containers. I'm not sure if cAdvisor will compile for windows, so that is probably step one. We then would need to re-implement container discovery, which needs to know how to discover and identify windows containers. cAdvisor currently uses inotify for this. This would interact with the Windows Job concept, rather than the linux cgroup concept. Last, we would need to collect metrics from the windows jobs for each container, which cAdvisor currently uses runc libraries for.
The kubelet supports both the metrics endpoint, and also added an emulated cAdvisor endpoint: https://github.com/kubernetes/kubernetes/blob/a626a2972e9ec1fa4a57fac4e7c41194acc45a67/pkg/kubelet/cadvisor/cadvisor_windows.go#L77
Would either of those be a sufficient replacement? If not, what is the use case that isn't covered? I'm thinking that we should work this into the kubelet in collaboration with SIG-Node and the containerd maintainers, rather than as a separate package.
This related issue covers some of the rationale behind it: https://github.com/google/cadvisor/issues/1394#issuecomment-234677894
@PatrickLang we tried the kubelet on windows with Prometheous, yes, currently we can see the number of Pods running on windows worker node in prometheous like Linux worker nodes. But looks like the Pod metrics such as CPU and memory are missing, we can see Pods metrics who are running on linux worker nodes. Is there any solution on that? Look forward to your response. Thanks.
@PatrickLang any update for my last question?
Most helpful comment
@PatrickLang we tried the kubelet on windows with Prometheous, yes, currently we can see the number of Pods running on windows worker node in prometheous like Linux worker nodes. But looks like the Pod metrics such as CPU and memory are missing, we can see Pods metrics who are running on linux worker nodes. Is there any solution on that? Look forward to your response. Thanks.