- Expanded
k get deploy -o yaml | yq '[.items[].spec.template.spec.containers[] | {.name: (.resources | {"cpu-req":.requests.cpu, "cpu-limit":.limits.cpu, "mem-req":.requests.memory, "mem-limit":.limits.memory})} ]'
- Shortened
k get deploy -o yaml | yq '[.items[].spec.template.spec.containers[] | {.name: (.resources | {"cpu": .requests.cpu + " / " + .limits.cpu, "mem": .requests.memory + " / " + .limits.memory})} ]'
- Oneline
k get deploy -o yaml | yq '[.items[].spec.template.spec.containers[] | {.name: (.resources | .requests.cpu + " / " + .limits.cpu + " , " + .requests.memory + " / " + .limits.memory)} ]'
- Set
minReplicas
k patch hpa --patch '{"spec":{"minReplicas": }}'
- Get Service ALB Annotations
k get service -o json | jq '[.items[].metadata.annotations | {app: .app, path: .["alb.ingress.kubernetes.io/healthcheck-path"], interval: .["alb.ingress.kubernetes.io/healthcheck-interval-seconds"] }]'