Deploy DHIS2 instances on the instance manager.
Query the pods you deployed (adapt namespace, selector, ...) and pipe it into the main.go
.
kubectl get pods -o json --namespace whoami -l app.kubernetes.io/name=core |
jq -r '[ .items[] | {name: .metadata.name,conditions: .status.conditions,containerStatuses: .status.containerStatuses} ]' |
go run cmd/kubetime/main.go
You should see something like
"ivo-dhis2-0-core-6fd5748d86-l7jvg": 2022-07-17 04:20:54 +0000 UTC (ready) - 2022-07-17 04:14:25 +0000 UTC (init) = 6m29s (duration) [1 (restarts)]
"ivo-dhis2-1-core-5dd7d5955d-k262j": 2022-07-17 04:19:50 +0000 UTC (ready) - 2022-07-17 04:14:49 +0000 UTC (init) = 5m1s (duration) [0 (restarts)]
"ivo-dhis2-2-core-594b8bdd7-k7wgg": 2022-07-17 04:21:12 +0000 UTC (ready) - 2022-07-17 04:15:09 +0000 UTC (init) = 6m3s (duration) [1 (restarts)]
"ivo-dhis2-3-core-6cb6fc7c5b-5dgxm": 2022-07-17 04:20:09 +0000 UTC (ready) - 2022-07-17 04:15:38 +0000 UTC (init) = 4m31s (duration) [0 (restarts)]
- cannot yet filter for pod prefix. So you might get startup duration for pods you are not interested in.
- is ready-init times the right measure to analyze DHIS2 startup time?