kubeval icon indicating copy to clipboard operation
kubeval copied to clipboard

Invalid memory resources

Open nlamirault opened this issue 4 years ago • 1 comments

Hi i've got a CronJob with resources like that :

resources:
   limits:
      cpu: 300m
      memory: 300m
   requests:
      cpu: 100m
      memory: 100m

I've got an error when pod is created :

Events:
  Type     Reason                  Age                   From                                                          Message
  ----     ------                  ----                  ----                                                          -------
  Normal   Scheduled               2m9s                  default-scheduler                                             Successfully assigned operations-preprod/clean-gcp-images-lequipe-1572516000-q4jt4 to gke-lequipe-exploita-auto-europe-west-5348ea87-ghjq
  Normal   SuccessfulMountVolume   2m8s                  kubelet, gke-lequipe-exploita-auto-europe-west-5348ea87-ghjq  MountVolume.SetUp succeeded for volume "default-token-wgffl"
  Normal   SuccessfulMountVolume   2m8s                  kubelet, gke-lequipe-exploita-auto-europe-west-5348ea87-ghjq  MountVolume.SetUp succeeded for volume "serviceaccount-volume"
  Normal   SandboxChanged          113s (x11 over 2m5s)  kubelet, gke-lequipe-exploita-auto-europe-west-5348ea87-ghjq  Pod sandbox changed, it will be killed and re-created.
  Warning  FailedCreatePodSandBox  112s (x12 over 2m7s)  kubelet, gke-lequipe-exploita-auto-europe-west-5348ea87-ghjq  Failed create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "clean-gcp-images-lequipe-1572516000-q4jt4": Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:286: decoding sync type from init pipe caused \"read parent: connection reset by peer\""

Without the typo error it works :

resources:
   limits:
      cpu: 300m
      memory: 300M
   requests:
       cpu: 100m
       memory: 100M

Documentation : https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory

It is possible to check memory values ?

nlamirault avatar Oct 31 '19 12:10 nlamirault

With kubectl dry-run, it only works with --dry-run=server, not client, for some reason. So this might unfortunately be outside of kubeval's scope. Not sure why, though.

terrafying avatar Sep 14 '20 14:09 terrafying