How to set CPU limit in docker file for Windows Containers

182 views Asked by At

I'm trying to host some docker windows based containers in Kubernetes 1.17.9 and unfortunately this version won't respect CPU limit set in pod specification,

Is there any way I can set the CPU limit in the docker file of the windows containers ?

1

There are 1 answers

0
Faheem On

Windows container's use a fair-share system for resource management and those are more guidelines than hard limits. Please read about the limitations here:

  1. https://kubernetes.io/docs/setup/production-environment/windows/intro-windows-in-kubernetes/#v1-container
  2. https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/resource-controls