Failed Task - Kubernetes Time check pod

Dear Gurus,

Can you please help me in understanding what is wrong n why this task was marked failed for me. The error mentioned is “mount path is incorrect under nautilus namespace” . Please find the screenshots of the pod describe showing the correct namespace and mount path i.e /opt/data/time. The output from the pod is also being correctly written with the 9 sec frequency taken from the configmap.
Though after a second reading of the question i did find a potential ambiguity in the way the log-volume is mentioned - whether it pertains to the configmap section under which it is mentioned or the path to capture the date/time output mentioned two paragraphs below. If that is the case, then teh question needs to be suitably corrected and the log_volume shifted to the correct paragraph.

Question: The Nautilus DevOps team want to create a time check pod in a particular Kubernetes namespace and record the logs. This might be initially used only for existing purposes, but later can be implemented in an existing cstrong textluster. Please find more details below about the task and perform it.

Create a pod called time-check in the nautilus namespace. This pod should run a container called time-check container should use the busybox image with latest tag only and remember to mention tag i.e busybox:latest.

Create a config map called time-config with the data TIME_FREQ=9 in the same namespace, and volume name should be log-volume.

The time-check container should run the command: while true; do date; sleep $TIME_FREQ;done and should write the result to the location /opt/data/time/time-check.log.

3.The path /opt/data/time on the pod should mount a volume that lasts the lifetime of this pod.

Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.

~ Prashanta


Not sure if you have checked below question and attempted. As per question mountpoint should lasts the lifetime of the pod as below. I didn’t see this in your screenshot, so just curious if you have done it.

3.The path /opt/data/time on the pod should mount a volume that lasts the lifetime of this pod.

    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)

  - name: log-volume
    emptyDir: {}

Hi Ramashish,

Thanks for looking at it.
Yes, the emptyDir volume has been mounted with name time-volume , not log-volume. That is the only ambiguity i see as i described. The reference to the name log-volume is along with the paragraph that describes the configmap which is why i mounted the configmap with the name log-volume, though as i noted later, it not actually used.
There is no volume name specified in the question in the paragraph/section that describes the requirement for the emptyDir, only the mountPath is mentioned, so i just used the name time-volume. If this the requirement, that emptyDir volume is to be mounted with name log-volume, the question needs to be amended to move the log-volume to the emptyDir section, not the configmap section to remove the ambiguity…
This is how my volume section of the pod manifest looks:


  • name: log-volume
    name: time-config
    - key: TIME_FREQ
    path: TIME_FREQ
  • name: time-volume
    emptyDir: {}

Best regards,

Fine @prash

Please tag KodeKloud Support to check your work logs to know what went wrong or what you are missing which marked your answer as Failed.


Thanks Ram,

@Inderpreet @KodeKloud , can you please take a look when possible. If the issue is really due to the /opt/data/time not being mounted with name log-volume, i think it would be a good idea to update the question to put this log-volume (volumename) in the correct paragraph so that people do not fail at this task due to mis-interpreting.
Thanks in advance.

Best regards,