k9s
k9s copied to clipboard
How is the 'AGE' of monitored resources calculated in k9s?

Describe the bug The display column 'AGE' showing more than 8h.
To Reproduce
- Exec
kubectl get deploy autoscale-deploy -n hpa
as an example - Exec
k9s
to startup the k9s and locate the 'autoscale-deploy' deployment
Historical Documents When applicable please include any supporting artifacts: k9s debug logs, configurations, resource manifests, ...
hongdongyue@hongdongyuedeMacBook-Pro ~ % k9s info
____ __.________
| |/ _/ __ \______
| < \____ / ___/
| | \ / /\___ \
|____|__ \ /____//____ >
\/ \/
Version: 0.32.5
Config: /Users/hongdongyue/Library/Application Support/k9s/config.yaml
Custom Views: /Users/hongdongyue/Library/Application Support/k9s/views.yaml
Plugins: /Users/hongdongyue/Library/Application Support/k9s/plugins.yaml
Hotkeys: /Users/hongdongyue/Library/Application Support/k9s/hotkeys.yaml
Aliases: /Users/hongdongyue/Library/Application Support/k9s/aliases.yaml
Skins: /Users/hongdongyue/Library/Application Support/k9s/skins
Context Configs: /Users/hongdongyue/Library/Application Support/k9s/clusters
Logs: /Users/hongdongyue/Library/Application Support/k9s/k9s.log
Benchmarks: /Users/hongdongyue/Library/Application Support/k9s/benchmarks
ScreenDumps: /Users/hongdongyue/Library/Application Support/k9s/screen-dumps
hongdongyue@hongdongyuedeMacBook-Pro ~ % cat "/Users/hongdongyue/Library/Application Support/k9s/config.yaml"
k9s:
liveViewAutoRefresh: false
screenDumpDir: /Users/hongdongyue/Library/Application Support/k9s/screen-dumps
refreshRate: 2
maxConnRetry: 5
readOnly: false
noExitOnCtrlC: false
ui:
enableMouse: false
headless: false
logoless: false
crumbsless: false
reactive: false
noIcons: false
defaultsToFullScreen: false
skipLatestRevCheck: false
disablePodCounting: false
shellPod:
image: busybox:1.35.0
namespace: default
limits:
cpu: 100m
memory: 100Mi
imageScans:
enable: false
exclusions:
namespaces: []
labels: {}
logger:
tail: 100
buffer: 5000
sinceSeconds: -1
textWrap: false
showTime: false
thresholds:
cpu:
critical: 90
warn: 70
memory:
critical: 90
warn: 70
hongdongyue@hongdongyuedeMacBook-Pro ~ % cat "/Users/hongdongyue/Library/Application Support/k9s/k9s.log"
...
11:10AM INF 🐶 K9s starting up...
11:10AM INF ✅ Kubernetes connectivity
11:24AM INF 🐶 K9s starting up...
11:24AM INF ✅ Kubernetes connectivity
11:32AM INF 🐶 K9s starting up...
11:32AM INF ✅ Kubernetes connectivity
11:36AM INF 🐶 K9s starting up...
11:36AM DBG Active Context "kubernetes-admin@kubernetes"
11:36AM INF ✅ Kubernetes connectivity
11:36AM DBG No custom skin found. Using stock skin
11:36AM DBG Factory START with ns `"sonar"
11:36AM DBG Fetching latest k9s rev...
11:36AM DBG K9s latest rev: "v0.32.5"
11:36AM DBG No custom skin found. Using stock skin
11:36AM DBG No DAO registry entry for "autoscaling/v2/horizontalpodautoscalers". Using generics!
11:39AM INF 🐶 K9s starting up...
11:39AM INF ✅ Kubernetes connectivity
3:46AM INF 🐶 K9s starting up...
3:46AM INF ✅ Kubernetes connectivity
3:48AM INF 🐶 K9s starting up...
3:48AM INF ✅ Kubernetes connectivity
11:49AM INF 🐶 K9s starting up...
11:49AM INF ✅ Kubernetes connectivity
12:06PM INF 🐶 K9s starting up...
12:06PM INF ✅ Kubernetes connectivity
1:48PM ERR can't connect to cluster error="Get \"https://10.10.102.86:6443/version?timeout=15s\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
1:48PM ERR ClusterUpdater failed error="conn check failed (1/5)"
1:48PM ERR can't connect to cluster error="Get \"https://10.10.102.86:6443/version?timeout=15s\": http2: client connection lost"
1:48PM ERR ClusterUpdater failed error="conn check failed (2/5)"
1:48PM ERR can't connect to cluster error="Get \"https://10.10.102.86:6443/version?timeout=15s\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
1:48PM ERR ClusterUpdater failed error="conn check failed (3/5)"
1:49PM ERR can't connect to cluster error="Get \"https://10.10.102.86:6443/version?timeout=15s\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
1:49PM ERR ClusterUpdater failed error="conn check failed (4/5)"
1:49PM WRN namespace validation failed for: "hpa" error="user not authorized to list all namespaces"
1:49PM WRN namespace validation failed for: "hpa" error="user not authorized to list all namespaces"
Expected behavior K9s display the correct 'AGE'
Screenshots If applicable, add screenshots to help explain your problem.
The following result is from kubectl. The display column 'AGE' appears normal.
The following result is from K9s. The display column 'AGE' showing more than 8h seems abnormal.
Versions (please complete the following information):
- OS: [macOS Sonoma 14.2.1(23C71)]
- K9s: [v0.32.5]
- K8s: [v1.23.5]
- TZ: [GMT+8]
Additional context Add any other context about the problem here.