After fixing the indentation errors, Kubernetes successfully created and 
executed the job:

apiVersion: batch/v1
kind: Job
metadata:
  name: keystore-configmap-job
spec:
  template:
    metadata:
      name: keystore-configmap
    spec:
      containers:
        - name: keystore
          image: ubuntu
          volumeMounts:
            - name: keystore-configmap-volume
              mountPath: /config-base64
          command: [ "sh", "-c", "cat /config-base64/keystore.jks | base64 
--decode | sha256sum" ]

      restartPolicy: Never

      volumes:
      - name: keystore-configmap-volume
        configMap:
          name: keystore-configmap

derek@derek-HP-EliteOne-800-G1-AiO:~/Projects/keystore-configmap$ kubectl 
create -f keystore-configmap-job.yaml
job "keystore-configmap-job" created
derek@derek-HP-EliteOne-800-G1-AiO:~/Projects/keystore-configmap$ kubectl 
get pods -a
NAME                           READY     STATUS      RESTARTS   AGE
keystore-configmap-job-c060t   0/1       Completed   0          57s
derek@derek-HP-EliteOne-800-G1-AiO:~/Projects/keystore-configmap$ kubectl 
logs keystore-configmap-job-c060t
ee8952c7f39c5a6f5fe8eccfdefe953fd4f6cf206071cf71312447f5eae79663  -
derek@derek-HP-EliteOne-800-G1-AiO:~/Projects/keystore-configmap$ cat config
/keystore.jks | sha256sum
ee8952c7f39c5a6f5fe8eccfdefe953fd4f6cf206071cf71312447f5eae79663  -

Thank you for pointing out the errors.

Derek

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to