Pod's creationTimestamp after PodScheduled

1,033 views
Skip to first unread message

Klaus Ma

unread,
Mar 3, 2017, 1:19:56 AM3/3/17
to Kubernetes developer/contributor discussion
Hi team,

When I checking the time step of Pod, I found Pod's createTimestamp ("05:45:19") after PodScheduled ("05:45:11"); does that make sense? why? My understanding is that, those time are filled by apiserver in REST api callback, please correct me if any mis-understand :).


# kc get pods mynginx-2792988044-zz3tr --namespace perftest -o json
{
    "apiVersion": "v1",
    "kind": "Pod",
    "metadata": {
        "annotations": {
            "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicaSet\",\"namespace\":\"perftest\",\"name\":\"mynginx-2792988044\",\"uid\":\"95e4f8e5-ffd4-11e6-b4fe-3440b5f00490\",\"apiVersion\":\"extensions\",\"resourceVersion\":\"47092686\"}}\n"
        },
        "creationTimestamp": "2017-03-03T05:45:19Z",
        "generateName": "mynginx-2792988044-",
        "labels": {
            "pod-template-hash": "2792988044",
            "run": "mynginx"
        },
        "name": "mynginx-2792988044-zz3tr",
        "namespace": "perftest",
        "ownerReferences": [
            {
                "apiVersion": "extensions/v1beta1",
                "controller": true,
                "kind": "ReplicaSet",
                "name": "mynginx-2792988044",
                "uid": "95e4f8e5-ffd4-11e6-b4fe-3440b5f00490"
            }
        ],
        "resourceVersion": "47093895",
        "selfLink": "/api/v1/namespaces/perftest/pods/mynginx-2792988044-zz3tr",
        "uid": "95f3a9ef-ffd4-11e6-b4fe-3440b5f00490"
    },
    "spec": {
        "containers": [
            {
                "image": "nginx:1.8.1",
                "imagePullPolicy": "IfNotPresent",
                "name": "mynginx",
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "volumeMounts": [
                    {
                        "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
                        "name": "default-token-n8qbn",
                        "readOnly": true
                    }
                ]
            }
        ],
        "dnsPolicy": "ClusterFirst",
        "nodeName": "n07k04",
        "restartPolicy": "Always",
        "securityContext": {},
        "serviceAccount": "default",
        "serviceAccountName": "default",
        "terminationGracePeriodSeconds": 30,
        "volumes": [
            {
                "name": "default-token-n8qbn",
                "secret": {
                    "defaultMode": 420,
                    "secretName": "default-token-n8qbn"
                }
            }
        ]
    },
    "status": {
        "conditions": [
            {
                "lastProbeTime": null,
                "lastTransitionTime": "2017-03-03T05:45:12Z",
                "status": "True",
                "type": "Initialized"
            },
            {
                "lastProbeTime": null,
                "lastTransitionTime": "2017-03-03T05:45:31Z",
                "status": "True",
                "type": "Ready"
            },
            {
                "lastProbeTime": null,
                "lastTransitionTime": "2017-03-03T05:45:11Z",
                "status": "True",
                "type": "PodScheduled"
            }
        ],
        "containerStatuses": [
            {
                "containerID": "docker://3224657ecc2a241f5f236432ebd9c94cc7fe524438eef93ae9f777e443815b17",
                "image": "nginx:1.8.1",
                "imageID": "docker://sha256:0d493297b409edb983b55509c22e7bd72d0e94051eb48a09727051c1aa280644",
                "lastState": {},
                "name": "mynginx",
                "ready": true,
                "restartCount": 0,
                "state": {
                    "running": {
                        "startedAt": "2017-03-03T05:45:31Z"
                    }
                }
            }
        ],
        "hostIP": "172.16.24.112",
        "phase": "Running",
        "podIP": "192.168.234.45",
        "startTime": "2017-03-03T05:45:12Z"
    }
}


Eric Tune

unread,
Mar 3, 2017, 1:27:51 AM3/3/17
to Klaus Ma, Kubernetes developer/contributor discussion
creationTimestamp is set by apiserver.
PodScheduled is set by the scheduler.
If those are on different machines, they might have different times.
You should run ntp on your kubernetes nodes and keep clocks synced.

--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/6998cbc4-88a8-48eb-b0d3-ee5114c3dcf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Oppenheimer

unread,
Mar 3, 2017, 1:30:58 AM3/3/17
to Eric Tune, Klaus Ma, Kubernetes developer/contributor discussion
On Thu, Mar 2, 2017 at 10:27 PM, 'Eric Tune' via Kubernetes developer/contributor discussion <kuberne...@googlegroups.com> wrote:
creationTimestamp is set by apiserver.
PodScheduled is set by the scheduler.
If those are on different machines, they might have different times.
You should run ntp on your kubernetes nodes and keep clocks synced.

To post to this group, send email to kuberne...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-dev@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages