I know that the storage used by Kubernetes in GKE is fully managed and not exposed (source). But I wanted to know if there is any limitation/restriction on the storage size. I couldn't find any link which clarifies this part.
For example, I am using GKE to run small jobs. Should I create a batch job which regularly deletes the old job information or not bother about deleting them at all?
A GKE job is running, and once the job is completed, the API will not delete the job. Jobs are not deleted but they are terminated
.
When a job is terminated
, it means that it is no longer running but you can still access its log files, and view its status. A terminated
job will not consume too many resources.
You may keep the terminated
jobs, if you would like to keep a record of the logs.
If retaining the logs has no benefit in your use case, then you may delete the old jobs.
Lastly, to answer your question, yes there is a storage limit on etcd in GKE. The limit on the etcd datastore is of a few GB.
Note that if the etcd datastore hits its storage limit, your application effectively becomes unavailable. This means that it would be a good idea to delete the jobs to make sure that the etcd storage limit is not reached.