I want to change timezone with command. I know applying hostpath.
Could you know how to apply command ?
ln -snf /user/share/zoneinfor/$TZ /etc/localtime
it works well within container. But I don't know applying with command and arguments in yaml file.
In a deployment, you can do it by creating a volumeMounts in /etc/localtime and setting its values. Here is an example I have for a mariadb:
You can change the
timezone
of your pod by using specific timezone config and hostPath volume to set specific timezone. You're yaml file will look something like:If you want it across all pod, deployment you need to add volume and volumeMounts to all your deployment file and change the
path
value inhostPath
section to the timezone you want to set.