diff --git a/kubernetes/vid/templates/check-job-completion-configmap.yaml b/kubernetes/vid/templates/check-job-completion-configmap.yaml
new file mode 100644
index 0000000..b9c4488
--- /dev/null
+++ b/kubernetes/vid/templates/check-job-completion-configmap.yaml
@@ -0,0 +1,83 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-check-job-completion
+  namespace: {{ include "common.namespace" . }}
+data:
+  vid_check_job_completion.py: |
+    #!/usr/bin/python
+    from __future__ import print_function
+    import time, argparse, logging, sys, os
+    import kubernetes.client
+    from kubernetes import client, config
+    from pprint import pprint
+
+    #extract env variables.
+    namespace = os.environ['NAMESPACE']
+    cert = os.environ['CERT']
+    host = os.environ['KUBERNETES_SERVICE_HOST']
+    token_path = os.environ['TOKEN']
+
+    with open(token_path, 'r') as token_file:
+        token = token_file.read().replace('\n', '')
+
+    client.configuration.api_key['authorization'] = token
+    client.configuration.api_key_prefix['authorization'] = 'Bearer'
+    client.configuration.host = "https://" + str(host)
+    client.configuration.ssl_ca_cert = cert
+
+    api_instance = client.BatchV1Api()
+
+    #setup logging
+    log = logging.getLogger(__name__)
+    handler = logging.StreamHandler(sys.stdout)
+    handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
+    handler.setLevel(logging.INFO)
+    log.addHandler(handler)
+    log.setLevel(logging.INFO)
+
+
+    def is_ready(job_name):
+        log.info( "[INFO] Checking if " + job_name + "  is completed")
+        pretty = True
+        job_status = False
+
+        try:
+            api_response = api_instance.read_namespaced_job_status(job_name, namespace, pretty=pretty)
+        except Exception as e:
+          print("Exception when calling BatchV1Api->read_namespaced_job_status: %s\n" % e)
+
+        pprint(api_response)
+        if api_response.status.succeeded == 1:
+          job_status_type = api_response.status.conditions[0].type
+          if job_status_type == "Complete":
+            job_status = True
+
+        print("[DBG] jobStatus: " + unicode(job_status))
+        return job_status
+
+
+    def main(args):
+        for job_name in args:
+            timeout = time.time() + 60 * 10
+            while True:
+                ready = is_ready(job_name)
+                if ready is True :
+                    break
+                elif time.time() > timeout:
+                    log.warning( "timed out waiting for '" + job_name + "' to be ready")
+                    exit(1)
+                else:
+                    time.sleep(5)
+
+
+    if __name__ == "__main__":
+        parser = argparse.ArgumentParser(description='Process some names.')
+        parser.add_argument('--job-name', action='append', required=True, help='A container name')
+        args = parser.parse_args()
+        arg_dict = vars(args)
+
+        for arg in arg_dict.itervalues():
+            main(arg)
+
+
