kubectl
kubectl copied to clipboard
Support human readable timestamps in `custom-columns` printer
What would you like to be added:
Currently, --output=custom-columns=AGE:.metadata.creationTimestamp
prints metav1.Time fields in ISO 8601 format (seen below), instead of the default "human readable" date strings like 3m
or 16h
that the default table printer uses.
kubectl get pods --output=custom-columns=NAME:.metadata.name,AGE:.metadata.creationTimestamp
NAME AGE
foo-bar 2023-11-03T22:23:49Z
Why is this needed:
- It would be better for users of kubectl plugins in general. I think some users would still prefer the current behavior.
- Many kubectl plugins that are printing resource
can import
cli-runtimerepository and provide a default output format with
custom-columns` that uses creationTimestamp.
I'm not entirely sure if this is a valid ask, so please evaluate.
/sig cli
This issue is currently awaiting triage.
SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted
label.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale
- Close this issue with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten
- Close this issue with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten