Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl tree command doesn't work for Statefulsets #58

Open
Aracki opened this issue Oct 18, 2022 · 1 comment
Open

kubectl tree command doesn't work for Statefulsets #58

Aracki opened this issue Oct 18, 2022 · 1 comment

Comments

@Aracki
Copy link

Aracki commented Oct 18, 2022

My kubectl tree sts node-bsc-03 command returns this:

NAMESPACE       NAME                                         READY  REASON  AGE
aws-blockchain  StatefulSet/node-bsc-03                      -              5d2h
aws-blockchain  ├─ControllerRevision/node-bsc-03-67ccb4f6cb  -              18h
aws-blockchain  ├─ControllerRevision/node-bsc-03-6b894df967  -              5d2h
aws-blockchain  ├─ControllerRevision/node-bsc-03-86f487dbb4  -              5d2h
aws-blockchain  ├─Pod/node-bsc-03-0                          True           5d2h
aws-blockchain  │ └─CiliumEndpoint/node-bsc-03-0             -              5d2h
aws-blockchain  └─Pod/node-bsc-03-1                          True           23m
aws-blockchain    └─CiliumEndpoint/node-bsc-03-1             -              23m

...although I'm pretty sure node-bsc-03-0 and node-bsc-03-1 are not booted from the same ControllerRevision objects.

If I run kubectl get sts node-bsc-03 -oyaml I can see the status:

status:
  availableReplicas: 2
  collisionCount: 0
  currentReplicas: 1
  currentRevision: node-bsc-03-6b894df967
  observedGeneration: 5
  readyReplicas: 2
  replicas: 2
  updateRevision: node-bsc-03-6b894df967
  updatedReplicas: 1

...after which it seems that the whole output of kubectl tree sts command is either wrongly sorted or something else is happening. Any clue?

@ahmetb
Copy link
Owner

ahmetb commented Feb 15, 2023

It entirely depends on ownerReferences on each object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants