{"id":2605,"date":"2020-11-23T11:41:46","date_gmt":"2020-11-23T10:41:46","guid":{"rendered":"https:\/\/geko2.factoryfy.com\/kubernetes-cronjobs-a-deeper-look\/"},"modified":"2021-11-04T09:14:57","modified_gmt":"2021-11-04T08:14:57","slug":"kubernetes-cronjobs-a-deeper-look","status":"publish","type":"post","link":"https:\/\/geko.cloud\/en\/kubernetes-cronjobs-a-deeper-look\/","title":{"rendered":"Kubernetes CronJobs \u2013 A deeper look"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p style=\"text-align: justify;\">Nowadays is more and more common for companies to migrate some parts of their infrastructure \u2014or <span class=\"VIiyi\" lang=\"en\"><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"es\" data-phrase-index=\"0\">even the<\/span><\/span> entire company\u2014 to the <a href=\"https:\/\/geko.cloud\/en\/what-is-the-cloud\/\">cloud<\/a>. There are two main approaches: Stay as close as possible to the previous architecture by using <a href=\"https:\/\/en.wikipedia.org\/wiki\/Virtual_machine\">VMs<\/a>, or bet for flexibility\/scalability\/availability and go for a new perspective by using a container orchestrator like <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/overview\/what-is-kubernetes\/\">Kubernetes<\/a>. Focusing on this latter approximation (Kubernetes), what you previously had running on an Operative System (which had access to mostly all the conveniences an Operative System provides) now runs in containers. In addition, these containers don&#8217;t commonly run directly on specific targets (or machines), but on a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Computer_cluster\">cluster<\/a>. Everything works cool and everything is awesome until you realize you&#8217;re not in a friendly and well-known environment anymore. Operative System&#8217;s tools like <em>automated tasks<\/em> or <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cron\">Cron<\/a> don&#8217;t actually follow the <a href=\"https:\/\/cloud.google.com\/solutions\/best-practices-for-building-containers\">containers&#8217; best practices<\/a>, as they are system-wide (which is the opposite to the app-isolation approach the containerization prays for). Embed those tools (or their behaviors) on your isolated application could become into a big pain full of workarounds and not-that-good practices.<\/p>\n<p style=\"text-align: justify;\">As a <del>full<\/del> huge ecosystem, <a href=\"https:\/\/geko.cloud\/en\/what-is-kubernetes\/\"><strong>Kubernetes<\/strong><\/a> provides some of these functionalities so the day-to-day requirements could be addressed. However, brand-new operatives come into the scene when talking about clusters, containers, and a big variety of workflows to handle. Across the following lines, you will learn how Kubernetes have solved the Cron functionality, and most of its tricky, hidden features.<\/p>\n<h2>1. How Kubernetes CronJobs actually work<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3091 alignright\" src=\"https:\/\/geko2.factoryfy.com\/wp-content\/uploads\/diagram1.png\" alt=\"cronjob-job-pod\" width=\"112\" height=\"245\" \/><\/p>\n<p style=\"text-align: justify;\">When a <strong>CronJob<\/strong> resource is created, what <a href=\"https:\/\/geko.cloud\/en\/what-is-kubernetes\/\"><strong>Kubernetes<\/strong><\/a> actually does is to register a schedule. <a href=\"https:\/\/github.com\/kubernetes\/kubernetes\/blob\/392bf0adef478175b9cf0226b02820eb1820f797\/pkg\/controller\/cronjob\/cronjob_controller.go#L95-L96\">Every 10 seconds the CronJob Controller checks if there are matching schedules to take care of<\/a>. When the proper time arrives a new Job resource is created to handle the task for that specific run. Finally, every Job creates a Pod in order to run the task.<\/p>\n<p style=\"text-align: justify;\">As you may notice this approach differs significantly from the OS one. What is actually happening here is a decoupling between cron-schedules&#8217; handling and the task&#8217;s handling (Jobs). This allows the cluster (and also you) to handle ephemeral tasks without loosing control over them.<\/p>\n<p style=\"text-align: justify;\">Moreover, Jobs can create one or more Pods (allowing concurrency\/parallelism) and they also ensure the tasks are successfully accomplished. <strong>However, this last behaviour could create additional issues as the container also offer a restart-handling feature<\/strong>. This topic will be addressed on the following section.<\/p>\n<h2>2. How to configure the advanced functionalities<\/h2>\n<p style=\"text-align: justify;\">First of all it must be taken into account that in order to configure a <strong>CronJob<\/strong>, every underlying resource could be configured as well. This means a CronJob configuration aggregates <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/job\/automated-tasks-with-cron-jobs\/#writing-a-cron-job-spec\">its own parameters<\/a> plus the <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/controllers\/job\/#writing-a-job-spec\">Job&#8217;s properties<\/a> and also the Pod\/container specifications. As most of the common work-flows can be addressed just by having a quick look at the documentation, the aim of this section is to show how to achieve certain tricky functionalities through configuration.<\/p>\n<h3>Errors&#8217; handling<\/h3>\n<p style=\"text-align: justify;\">When a container stops its execution (because of a failure or after a successful execution) there are a set of actions that could be taken just after, which are defined \u2014as usually\u2014 by resource directives. Typical actions are restarting the container (always or only when a failure is detected) or doing nothing. Moreover, the Jobs add another complexity layer which ensures the task is successfully terminated. This means the restarting policy is guaranteed through two different layers that must be properly configured to achieve the desired behavior.<\/p>\n<p>On the container side, the directive is called <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/pods\/pod-lifecycle\/#restart-policy\">restart Policy<\/a>. On the Job side, this policy is &#8220;handled&#8221; by the directive <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/controllers\/job\/#pod-backoff-failure-policy\">back-off limit<\/a>, which specifies the <strong>number<\/strong> of allowed failures before giving up and stopping to restart the task. Keeping that in mind, setting up a CronJob able to fail without restarts is as easy as follows.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">apiVersion: batch\/v1beta1\r\nkind: CronJob\r\n...\r\nspec:\r\n  ...\r\n  jobTemplate:\r\n    spec:\r\n      <strong>backoffLimit: 0<\/strong>\r\n      template:\r\n        spec:\r\n          containers:\r\n            ...\r\n          <strong>restartPolicy: Never<\/strong><\/pre>\n<\/div>\n<h3>Overlapping vs. Sequential executions<\/h3>\n<p style=\"text-align: justify;\">When talking about a specific <strong>CronJob<\/strong>, multiple runs of it could coexist. Depending on the kind of flow the task is characterized for, concurrency could be a way to proceed in order to speed-up processing. There are three available ways to handle how the Jobs are run, which are controlled by the directive <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/job\/automated-tasks-with-cron-jobs\/#concurrency-policy\">concurrency Policy<\/a>.<\/p>\n<ol>\n<li><strong>Allow<\/strong>: Allow overlapping executions.<\/li>\n<li><strong>Replace<\/strong>: New executions terminate the previous ones before starting.<\/li>\n<li><strong>Forbid<\/strong>: New executions are discarded if a previous one is still running.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">While the first one allows concurrence, the two last ones bet for sequential executions. Once again, to stay as close to old-fashioned crons the closer approach is to set the <strong>Allow<\/strong> policy. On the other hand, concurrent runs could cause undesired effects if they are not properly managed, and it&#8217;s something that should be kept in mind and also be handled with care.<\/p>\n<h3>Minimum execution time<\/h3>\n<p style=\"text-align: justify;\">As it was previously stated, new task executions could interfere with previous ones depending on how the concurrency directives are set. There&#8217;s a property from the container specification which could be useful to deal with the consequences of interrupted runs. A minimum execution time can be set through the <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/containers\/container-lifecycle-hooks\/#hook-handler-execution\">terminationGracePeriodSeconds<\/a> container-property so even if another new task causes an old one to finish, a graceful termination is guaranteed.<\/p>\n<h2>3. Operating the CronJobs as a Master<\/h2>\n<p style=\"text-align: justify;\">Once the configuration shows up what the <strong>CronJob<\/strong> was intended to do, the <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/job\/automated-tasks-with-cron-jobs\">basic commands can be issued to retrieve the status<\/a> (scheduling info, running state, logs, &#8230;). As on the previous section, the following operatives will cover how to achieve some uncommon features.<\/p>\n<h3>Enable\/disable CronJobs<\/h3>\n<p style=\"text-align: justify;\">The CronJob&#8217;s specification has a property called <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/job\/automated-tasks-with-cron-jobs\/#suspend\">suspend<\/a> which allows to deactivate them. Temporarily or not, <strong>CronJobs<\/strong> can be defined but not being executed at certain times (as their schedule states).<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\"># Disable a CronJob\r\nCRONJOB_NAME=my-cronjob-1\r\nkubectl patch cronjobs $CRONJOB_NAME -p '{\"spec\" : {\"suspend\" : true }}'\r\n\r\n# Disable ALL CronJobs\r\nkubectl get cronjobs | grep False | cut -d' ' -f 1 | xargs kubectl patch cronjobs -p '{\"spec\" : {\"suspend\" : true }}'<\/pre>\n<\/div>\n<p><strong>Have a look at the following section in order to get further details about the side effects this could cause.<\/strong><\/p>\n<h3>Run CronJobs manually<\/h3>\n<p style=\"text-align: justify;\">It&#8217;s widely known testing is very useful when detecting undesirable effects. <strong>CronJobs<\/strong> can be run manually even when they are suspended (deactivated), so keeping them in that state and running them under testing circumstances could help to validate everything is correct.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">CRONJOB_NAME=my-cronjob-1\r\nkubectl create job --from=cronjobs\/$CRONJOB_NAME $CRONJOB_NAME-manual-exec-01<\/pre>\n<\/div>\n<h2>4. Showing up the edge cases<\/h2>\n<p style=\"text-align: justify;\">After all, there would be no variety if everything were the same way. Every situation has its own particularities and specific characteristics, so when talking about <strong>CronJobs<\/strong> that will not be different. Across the following lines, some edge cases will be presented and addressed, so the solutions to them could be reused (or \u2014at least\u2014 taken into consideration).<\/p>\n<h3>Maximum execution time<\/h3>\n<p style=\"text-align: justify;\">On previous sections the execution-time topic was addressed to guarantee a graceful time is conceded before termination. But hey! What about the tasks taking too much time to finish? Agnostic containers&#8217; motivation (and also the <a href=\"https:\/\/geko.cloud\/en\/what-is-the-cloud\/\"><strong>Kubernetes<\/strong> <\/a>one) is to run the tasks until the infinity and beyond. Containers can flow or they can crash, but they should never be terminated as a common practice. Following this principle, there is no way to manage timeouts from the <strong>CronJobs<\/strong>\/Jobs\/Containers specification. So, it&#8217;s impossible to handle a maximum execution time? \u2014 No, it isn&#8217;t! Hence is where the Linux tool-set comes to the rescue. There&#8217;s a command called <a href=\"https:\/\/linux.die.net\/man\/1\/timeout\">timeout<\/a> that could be used to run another command until a specific amount of time.<\/p>\n<p style=\"text-align: justify;\">Even though the previous utility could limit the time, the exit code when it does it&#8217;s not a successful one so the container will enter into a failure status (that could escalate to a restart if it&#8217;s allowed to). On the other hand, the command status could be preserved but then it can&#8217;t be known if it was terminated or not. So, how to address them all? On the following snippet can be found a suggested approach that manages to always finish successfully while giving feedback about what actually happened.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{\">containers:\r\n  - name: \"my-time-limited-to-10s-container\"\r\n    ...\r\n    command: [\"bash\", \"-c\"]\r\n    args:\r\n      - \/usr\/bin\/timeout 10 bash -c 'bash -c \"comm arg1\" &amp;&amp; echo OK || echo KO-COMM' || echo KO-TIME<\/pre>\n<\/div>\n<h3>CronJobs not being scheduled after being disabled and enabled again<\/h3>\n<p style=\"text-align: justify;\">There is a side effect when a <strong>CronJob<\/strong> is disabled, which is that after 100 missed schedules the <strong>CronJob<\/strong> will no longer be scheduled. This is already on the docs, but it&#8217;s just mentioned as something else not very important. The solution here is to recreate the resource.<\/p>\n<h3>CronJobs being scheduled out of their schedule just after being enabled<\/h3>\n<p style=\"text-align: justify;\">Another unexpected effect you may find when dealing with <strong>CronJobs<\/strong> is that when reactivating one of them \u2014despite that time doesn&#8217;t match the schedule\u2014 it is immediately executed. This happens because the execution is not just an isolated event, but a time-window until a deadline. This means every missed schedule (because of concurrency or because the <strong>CronJob<\/strong> is disabled) will increase a counter (up to a certain number, which is something that could be related to the previous edge case). Then, when the CronJob gets reactivated and it&#8217;s allowed to run, the controller realizes there are pending schedules. If the time window to the deadline is still not closed, the <strong>CronJob<\/strong> begins to run.<\/p>\n<p style=\"text-align: justify;\">This behavior can be addressed by setting the <a href=\"https:\/\/medium.com\/@hengfeng\/what-does-kubernetes-cronjobs-startingdeadlineseconds-exactly-mean-cc2117f9795f\">startingDeadlineSeconds<\/a> directive to a small value, so the execution window will not match the reactivation time.<\/p>\n<h3>CronJobs is not being scheduled<\/h3>\n<p style=\"text-align: justify;\">It comes the <strong><em>startingDeadlineSeconds<\/em> directive could be set to any value, but not all of them are going to cause the desired effect<\/strong>. As previously said the <strong>CronJob<\/strong>&#8216;s controller runs every 10 seconds, so <strong>every value below ten seconds will make the CronJobs never be scheduled<\/strong>. An <a href=\"https:\/\/github.com\/kubernetes\/website\/issues\/23622\">issue<\/a> has been submitted by us to the Kubernetes website project, in order to warn them about this effect. In the next versions you will probably find out it&#8217;s already documented, but not for now.<\/p>\n<p><strong>So don&#8217;t forget to set <em>startingDeadlineSeconds<\/em> to a value greater than 10.<\/strong><\/p>\n<h2>Conclusion<\/h2>\n<p style=\"text-align: justify;\">As you may have seen, the difference between OS&#8217; crons and <a href=\"https:\/\/geko.cloud\/en\/what-is-the-cloud\/\"><strong>Kubernetes<\/strong><\/a>&#8216; crons is bigger than it could be expected at first looking. There are several scenarios on a cluster and many situations to handle, so they are addressed. Sometimes we will be looking for a OS-like behavior, sometimes not, but probably all of them will be possible to achieve. On the other hand, being so multi-purpose could end (as on CronJobs) on more difficult configuration experience, which could be even more difficult when the docs are a little bit short and vague.<\/p>\n<p style=\"text-align: justify;\">Thankfully, you can always count on <a href=\"https:\/\/geko.cloud\/en\/\">Geko<\/a> team -a high-skilled engineering team- who will dig on the topic until getting it easy for you. Don&#8217;t forget to come back to the <a href=\"https:\/\/geko2.factoryfy.com\/blog-2\/\">Geko\u2019s blog<\/a> and check out what&#8217;s new in here! The Geko team will be always glad to see you back, and also you should <a href=\"https:\/\/geko.cloud\/en\/contact\/\" target=\"_blank\" rel=\"noopener noreferrer\">contact us for further information!<\/a><\/p>\n<h2>Further reading<\/h2>\n<p><a href=\"https:\/\/kubernetes.io\/docs\/tasks\/job\/automated-tasks-with-cron-jobs\/\">https:\/\/kubernetes.io\/docs\/tasks\/job\/automated-tasks-with-cron-jobs\/<\/a><br \/>\n<a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/controllers\/cron-jobs\/\">https:\/\/kubernetes.io\/docs\/concepts\/workloads\/controllers\/cron-jobs\/<\/a><br \/>\n<a href=\"https:\/\/kubernetes.io\/docs\/concepts\/workloads\/controllers\/job\/\">https:\/\/kubernetes.io\/docs\/concepts\/workloads\/controllers\/job\/<\/a><br \/>\n<a href=\"https:\/\/www.magalix.com\/blog\/kubernetes-patterns-the-cron-job-pattern\">https:\/\/www.magalix.com\/blog\/kubernetes-patterns-the-cron-job-pattern<\/a><br \/>\n<a href=\"https:\/\/medium.com\/@bambash\/kubernetes-docker-and-cron-8e92e3b5640f\">https:\/\/medium.com\/@bambash\/kubernetes-docker-and-cron-8e92e3b5640f<\/a><br \/>\n<a href=\"https:\/\/medium.com\/cloud-native-the-gathering\/how-to-write-and-use-kubernetes-cronjobs-3fbb891f88b8\">https:\/\/medium.com\/cloud-native-the-gathering\/how-to-write-and-use-kubernetes-cronjobs-3fbb891f88b8<\/a><br \/>\n<a href=\"https:\/\/medium.com\/@hengfeng\/what-does-kubernetes-cronjobs-startingdeadlineseconds-exactly-mean-cc2117f9795f\">https:\/\/medium.com\/@hengfeng\/what-does-kubernetes-cronjobs-startingdeadlineseconds-exactly-mean-cc2117f9795f<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Nowadays is more and more common for companies to migrate some parts of their infrastructure \u2014or even the entire company\u2014 to the cloud. There are two main approaches: Stay as close as possible to the previous architecture by using VMs, or bet for flexibility\/scalability\/availability and go for a new perspective by using a container [&hellip;]<\/p>\n","protected":false},"author":38,"featured_media":5403,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[67],"tags":[90],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kubernetes CronJobs \u2013 A deeper look - Geko Cloud<\/title>\n<meta name=\"description\" content=\"If you want to go for greater availability and flexibility by using a container orchestrator such as Kubernetes, in our post you will learn how CronJobs work in this ecosystem.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kubernetes CronJobs \u2013 A deeper look - Geko Cloud\" \/>\n<meta property=\"og:description\" content=\"If you want to go for greater availability and flexibility by using a container orchestrator such as Kubernetes, in our post you will learn how CronJobs work in this ecosystem.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/\" \/>\n<meta property=\"og:site_name\" content=\"Geko Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-23T10:41:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-04T08:14:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"397\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Geko Cloud\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@geko_cloud\" \/>\n<meta name=\"twitter:site\" content=\"@geko_cloud\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/\"},\"author\":{\"name\":\"Geko Cloud\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/c87e3587fb419825d72ac2043e798ab6\"},\"headline\":\"Kubernetes CronJobs \u2013 A deeper look\",\"datePublished\":\"2020-11-23T10:41:46+00:00\",\"dateModified\":\"2021-11-04T08:14:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/\"},\"wordCount\":1784,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/geko.cloud\/es\/#organization\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg\",\"keywords\":[\"Kubernetes\"],\"articleSection\":[\"Labs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/\",\"url\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/\",\"name\":\"Kubernetes CronJobs \u2013 A deeper look - Geko Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/geko.cloud\/es\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg\",\"datePublished\":\"2020-11-23T10:41:46+00:00\",\"dateModified\":\"2021-11-04T08:14:57+00:00\",\"description\":\"If you want to go for greater availability and flexibility by using a container orchestrator such as Kubernetes, in our post you will learn how CronJobs work in this ecosystem.\",\"breadcrumb\":{\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#primaryimage\",\"url\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg\",\"contentUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg\",\"width\":1100,\"height\":397,\"caption\":\"cronjobs\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/geko.cloud\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kubernetes CronJobs \u2013 A deeper look\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/geko.cloud\/es\/#website\",\"url\":\"https:\/\/geko.cloud\/es\/\",\"name\":\"Geko Cloud\",\"description\":\"Servicios de consultor\u00eda cloud y devops\",\"publisher\":{\"@id\":\"https:\/\/geko.cloud\/es\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/geko.cloud\/es\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/geko.cloud\/es\/#organization\",\"name\":\"Geko Cloud\",\"url\":\"https:\/\/geko.cloud\/es\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png\",\"contentUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png\",\"width\":1650,\"height\":809,\"caption\":\"Geko Cloud\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/geko_cloud\",\"https:\/\/www.instagram.com\/gekocloud\/\",\"https:\/\/www.linkedin.com\/company\/gekocloud\",\"https:\/\/www.youtube.com\/channel\/UC5EFLCqUM7fEaXSa_0nWowQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/c87e3587fb419825d72ac2043e798ab6\",\"name\":\"Geko Cloud\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/10fe5eb7a547a27afabbe3a5a0f60c96?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/10fe5eb7a547a27afabbe3a5a0f60c96?s=96&d=mm&r=g\",\"caption\":\"Geko Cloud\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kubernetes CronJobs \u2013 A deeper look - Geko Cloud","description":"If you want to go for greater availability and flexibility by using a container orchestrator such as Kubernetes, in our post you will learn how CronJobs work in this ecosystem.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/","og_locale":"en_US","og_type":"article","og_title":"Kubernetes CronJobs \u2013 A deeper look - Geko Cloud","og_description":"If you want to go for greater availability and flexibility by using a container orchestrator such as Kubernetes, in our post you will learn how CronJobs work in this ecosystem.","og_url":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/","og_site_name":"Geko Cloud","article_published_time":"2020-11-23T10:41:46+00:00","article_modified_time":"2021-11-04T08:14:57+00:00","og_image":[{"width":1100,"height":397,"url":"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg","type":"image\/jpeg"}],"author":"Geko Cloud","twitter_card":"summary_large_image","twitter_creator":"@geko_cloud","twitter_site":"@geko_cloud","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#article","isPartOf":{"@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/"},"author":{"name":"Geko Cloud","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/c87e3587fb419825d72ac2043e798ab6"},"headline":"Kubernetes CronJobs \u2013 A deeper look","datePublished":"2020-11-23T10:41:46+00:00","dateModified":"2021-11-04T08:14:57+00:00","mainEntityOfPage":{"@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/"},"wordCount":1784,"commentCount":0,"publisher":{"@id":"https:\/\/geko.cloud\/es\/#organization"},"image":{"@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#primaryimage"},"thumbnailUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg","keywords":["Kubernetes"],"articleSection":["Labs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/","url":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/","name":"Kubernetes CronJobs \u2013 A deeper look - Geko Cloud","isPartOf":{"@id":"https:\/\/geko.cloud\/es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#primaryimage"},"image":{"@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#primaryimage"},"thumbnailUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg","datePublished":"2020-11-23T10:41:46+00:00","dateModified":"2021-11-04T08:14:57+00:00","description":"If you want to go for greater availability and flexibility by using a container orchestrator such as Kubernetes, in our post you will learn how CronJobs work in this ecosystem.","breadcrumb":{"@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#primaryimage","url":"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg","contentUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2020\/11\/cronjobs.jpg","width":1100,"height":397,"caption":"cronjobs"},{"@type":"BreadcrumbList","@id":"https:\/\/geko.cloud\/es\/kubernetes-cronjobs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/geko.cloud\/en\/"},{"@type":"ListItem","position":2,"name":"Kubernetes CronJobs \u2013 A deeper look"}]},{"@type":"WebSite","@id":"https:\/\/geko.cloud\/es\/#website","url":"https:\/\/geko.cloud\/es\/","name":"Geko Cloud","description":"Servicios de consultor\u00eda cloud y devops","publisher":{"@id":"https:\/\/geko.cloud\/es\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/geko.cloud\/es\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/geko.cloud\/es\/#organization","name":"Geko Cloud","url":"https:\/\/geko.cloud\/es\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/","url":"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png","contentUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png","width":1650,"height":809,"caption":"Geko Cloud"},"image":{"@id":"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/geko_cloud","https:\/\/www.instagram.com\/gekocloud\/","https:\/\/www.linkedin.com\/company\/gekocloud","https:\/\/www.youtube.com\/channel\/UC5EFLCqUM7fEaXSa_0nWowQ"]},{"@type":"Person","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/c87e3587fb419825d72ac2043e798ab6","name":"Geko Cloud","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/10fe5eb7a547a27afabbe3a5a0f60c96?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10fe5eb7a547a27afabbe3a5a0f60c96?s=96&d=mm&r=g","caption":"Geko Cloud"}}]}},"_links":{"self":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/2605"}],"collection":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/comments?post=2605"}],"version-history":[{"count":3,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/2605\/revisions"}],"predecessor-version":[{"id":5261,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/2605\/revisions\/5261"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/media\/5403"}],"wp:attachment":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/media?parent=2605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/categories?post=2605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/tags?post=2605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}