CPU/Mem usage for cron jobs on GCP K8S while not running

3/15/2018

I have setup a cron job on GCP Kubernetes. It runs once per day at 10:00am. The job runs as expected however, I don't really understand what the charts say on the GCP K8S console.

enter image description here

As shown in the charts, there are around 1.5 CPU and 8G RAM at this point, when the cron job is not running. I expect the current usage should be zero as it is not running.

Could anyone see what is wrong? or I read the charts wrong?

Note I do retain 7 jobs in the history. Each job ran about 15sec and completed successfully.

State:          Terminated
  Reason:       Completed
  Exit Code:    0
  Started:      Thu, 08 Mar 2018 04:00:56 +0000
  Finished:     Thu, 08 Mar 2018 04:01:09 +0000

enter image description here

20180320 EDIT: I found all graphs from other cron jobs all look the same. Is it something I setup wrong?

enter image description here enter image description here

-- Andy
cron
google-cloud-platform
kubernetes

1 Answer

3/16/2018

I reproduced your situation by that way:

  1. Created CronJob with a name "Application"
  2. Added an application using Deployment with a name "Application"

And now, I see on graphics of Cron Job details information not only about a cronjob itself, but also about an application.

So, I think, dashboard using name of object for getting a data.

Looks like you have any other deployment, replicaset etc. which always running and has a same name as your cronjob and on graphics you see the mix of data from it and from your cronjob.

-- Anton Kostenko
Source: StackOverflow