title: How to use concurrencyPolicy for GKE cron job correctly?
body: <p>I set <code>concurrencyPolicy</code> to <code>Allow</code>, here is my <code>cronjob.yaml</code>:</p>
  
  <pre><code>apiVersion: batch/v1beta1
  kind: CronJob
  metadata:
    name: gke-cron-job
  spec:
    schedule: '*/1 * * * *'
    startingDeadlineSeconds: 10
    concurrencyPolicy: Allow
    successfulJobsHistoryLimit: 3
    failedJobsHistoryLimit: 1
    jobTemplate:
      spec:
        template:
          metadata:
            labels:
              run: gke-cron-job
          spec:
            restartPolicy: Never
            containers:
              - name: gke-cron-job-solution-2
                image: docker.io/novaline/gke-cron-job-solution-2:1.3
                env:
                  - name: NODE_ENV
                    value: 'production'
                  - name: EMAIL_TO
                    value: 'novaline.dulin@gmail.com'
                  - name: K8S_POD_NAME
                    valueFrom:
                      fieldRef:
                        fieldPath: metadata.name
                ports:
                  - containerPort: 8080
                    protocol: TCP
  </code></pre>
  
  <p>After reading docs: <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/cronjobs" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/cronjobs</a></p>
  
  <p>I still don't understand how to use <code>concurrencyPolicy</code>.</p>
  
  <p>How can I run my cron job concurrency?</p>
  
  <p>Here is the logs of cron job: </p>
  
  <pre class="lang-sh prettyprint-override"><code>☁  nodejs-gcp [master] ⚡  kubectl logs -l run=gke-cron-job
  
  &gt; gke-cron-job-solution-2@1.0.2 start /app
  &gt; node ./src/index.js
  
  config:  { ENV: 'production',
    EMAIL_TO: 'novaline.dulin@gmail.com',
    K8S_POD_NAME: 'gke-cron-job-1548660540-gmwvc',
    VERSION: '1.0.2' }
  [2019-01-28T07:29:10.593Z] Start daily report
  send email:  { to: 'novaline.dulin@gmail.com', text: { test: 'test data' } }
  
  &gt; gke-cron-job-solution-2@1.0.2 start /app
  &gt; node ./src/index.js
  
  config:  { ENV: 'production',
    EMAIL_TO: 'novaline.dulin@gmail.com',
    K8S_POD_NAME: 'gke-cron-job-1548660600-wbl5g',
    VERSION: '1.0.2' }
  [2019-01-28T07:30:11.405Z] Start daily report
  send email:  { to: 'novaline.dulin@gmail.com', text: { test: 'test data' } }
  
  &gt; gke-cron-job-solution-2@1.0.2 start /app
  &gt; node ./src/index.js
  
  config:  { ENV: 'production',
    EMAIL_TO: 'novaline.dulin@gmail.com',
    K8S_POD_NAME: 'gke-cron-job-1548660660-8mn4r',
    VERSION: '1.0.2' }
  [2019-01-28T07:31:11.099Z] Start daily report
  send email:  { to: 'novaline.dulin@gmail.com', text: { test: 'test data' } }
  </code></pre>
  
  <p>As you can see, the <strong>timestamp</strong> indicates that the cron job is not concurrency.</p>