Skip to content

kubelet reports pods status as not ready when a container terminates with exit code 0  #8327

Closed
@caesarxuchao

Description

This causes #8307. In contrib/git-sync demo, the git-sync container voluntarily exits and gets recreated to "periodically" sync the git repo, but the pod is then reported as not ready,

$ kubectl get pods blog-pod -o yaml
status:
    Condition:
    - status: "False"
      type: Ready
    containerStatuses:
    - containerID: docker://b334dd2a6dbb25b9513e7a3924800fa7b34861f5853876a9bc50491e762a6bdb
      image: caesarxuchao/git-sync
      imageID: docker://06b871b5d0e455538eeee600c70c3de0f3aa7571d09eaa060667b9ae2385a4a2
      lastState:
        termination:
          containerID: docker://52b7dce89bdcd87c33c752a9b633a85754a92f8ea27b796a6925c8f477d23249
          exitCode: 0
          finishedAt: 2015-05-15T17:33:10Z
          startedAt: 2015-05-15T17:33:05Z
      name: git-sync
      ready: false
      restartCount: 12
      state:
        running:
          startedAt: 2015-05-15T17:33:15Z

The end result is that the service targets at this pod does not get endpoints and thus not working.

Thanks to @lavalamp for helping with the debugging.
@nikhiljindal

Metadata

Assignees

Labels

area/kubelet-apipriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.sig/nodeCategorizes an issue or PR as relevant to SIG Node.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions