My loki distributed cluster has been installed.
# kubectl get pod -n loki
NAME READY STATUS RESTARTS AGE
loki-distributed-distributor-546ccbbccc-xck9n 1/1 Running 0 55m
loki-distributed-gateway-6979b8cb47-rvdzx 1/1 Running 0 55m
loki-distributed-ingester-0 1/1 Running 0 12m
loki-distributed-querier-0 1/1 Running 0 55m
loki-distributed-query-frontend-7f979c674b-94v8h 1/1 Running 0 55m
But the time zone on my local server is inconsistent with the time zone inside the container:
[root@kubernetes-master-001 ~]# kubectl exec -it -n loki loki-distributed-ingester-0 -- date
Wed May 8 03:08:15 UTC 2024
[root@kubernetes-master-001 ~]# date
Wed May 8 11:08:18 CST 2024
Causing me to report an error in the time zone when collecting logs on Promtail:
error="server returned HTTP status 400 Bad Request (400): entry for stream '{filename=\"/var/server.log\", job=\"api\", stream=\"stdout\", time=\"2023-17-03 15:30:49,150\"}'
has timestamp too new: 2023-17-07T14:30:49Z"
How can I adjust the time zone inside the container to Asia/Shanghai?