Question

It is required to change timezone on UI cluster in Kubernetes. How we can do it?

Answer

NOTE: The configuration change below needs to be reapplied with each hcl or ui helm chart update and will cause short (5 min) CloudBlue Commerce PCP unavaialblility.

Please modify the deployment on hcl and ui containers in the their respective deployment:

# kubectl get deploy -o jsonpath='{range .items[*]}{@.metadata.name}{"\n"}{end}' | xargs -d'\n' -I{} kubectl edit deploy {}

Modify the following sections in the containers templates:

spec:
  containers:
    ...
    volumeMounts:
    - name: tz-config
      mountPath: /etc/localtime
  volumes:
    - name: tz-config
      hostPath:
        path: /usr/share/zoneinfo/Europe/Prague

After the deployment will be saved, the corresponding pods will be redeployed with new timezone.

Internal content