Create a pod called time-check
in the devops
namespace. The pod should have a container named time-check
, using the busybox
image with the latest
tag (busybox:latest
).
Create a config map named time-config
with the data TIME_FREQ=12
in the same namespace.
Configure the time-check
container to run the command: while true; do date; sleep $TIME_FREQ; done
. Ensure the output is written to /opt/sysops/time/time-check.log
. Add an environment variable TIME_FREQ
in the container, getting its value from the config map TIME_FREQ
key.
Create a volume log-volume
and mount it at /opt/sysops/time
within the container.
Create a manifest file time-check.yaml
.
Now apply
ss