Kubernetes Container Timezone Management

Abdurrahim Yıldırım
3 min readDec 21, 2019

I want to show how to change the container’s timezone which runs on the Kubernetes cluster.

Basically, when you push a docker image from the docker hub you can easily check which timezone already defined for the image. I just defined a basic YAML file, creates a container that sleeps “100000” seconds. We used BusyBox image.

BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc.

#cat /tmp/defaulttz.yaml
apiVersion: v1
kind: Pod
metadata:
labels:
run: defaulttz
name: defaulttz
spec:
containers:
- image: busybox
name: defaulttz
args:
- sleep
- "100000"
#kubectl create -f /tmp/defaulttz.yaml
pod/defaulttz created
#kubectl get pods
NAME READY STATUS RESTARTS AGE
defaulttz 1/1 Running 0 13s

When you create a new Pod with a POD definition file, it performs some steps like pull image, create container and start container etc.

#kubectl describe  pod defaulttz
.........
.........
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled <unknown>…

--

--