Hi All, In LighteningLab-1, Question 3, I tried with the below solution, but sti . . .

Manas Sahoo:
Hi All, In LighteningLab-1, Question 3, I tried with the below solution, but still it is failing, Can anybody help me to understand where I am doing mistake
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: time-check
name: time-check
namespace: dvl1987
spec:
volumes:

  • name: task-pv-storage
    emptyDir: {}
    containers:
  • image: busybox
    name: time-check
    env:
    • name: TIME_FREQ
      valueFrom:
      configMapKeyRef:
      name: time-config
      key: TIME_FREQ
      command: [ “/bin/sh”, “-c”, “while true;do date;sleep $TIME_FREQ;done” ]
      volumeMounts:
    • mountPath: “/opt/time”
      name: task-pv-storage

vikas mahajan:
you need to output the command like this

vikas mahajan:

      i=0;
      while true;
      do
        echo "$i: $(date)" >> /var/log/1.log;
        echo "$(date) INFO $i" >> /var/log/2.log;
        i=$((i+1));
        sleep 1;
      done  

vikas mahajan:
this part is missing - and write the result to the location /opt/time/time-check.log.

vikas mahajan:
command: [ “/bin/sh”, “-c”, “while true;do date;sleep $TIME_FREQ;done > /opt/time/time-check.log” ]

Manas Sahoo:
oh ok…thanks Vikas…