When a pod contains multiple containers, the summary function and subsequently the dashboard only returns the current request and limit values for the last container in a deployment.
For example, take the following deployments:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test
labels:
app: test
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: test
template:
metadata:
labels:
app: test
spec:
containers:
- name: test
image: debian:stable-slim
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
resources:
limits:
cpu: "1"
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test2
labels:
app: test2
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: test2
template:
metadata:
labels:
app: test2
spec:
containers:
- name: test2a
image: debian:stable-slim
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
resources:
limits:
cpu: "1"
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
- name: test2b
image: debian:stable-slim
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
resources:
limits:
cpu: 50m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test3
labels:
app: test3
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: test3
template:
metadata:
labels:
app: test3
spec:
containers:
- name: test3b
image: debian:stable-slim
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
resources:
limits:
cpu: 50m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi
- name: test3a
image: debian:stable-slim
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
resources:
limits:
cpu: "1"
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
{
"deployments": [
{
"containers": [
{
"lowerBound": {
"cpu": "25m",
"memory": "262144k"
},
"upperBound": {
"cpu": "48m",
"memory": "262144k"
},
"target": {
"cpu": "25m",
"memory": "262144k"
},
"uncappedTarget": {
"cpu": "25m",
"memory": "262144k"
},
"limits": {
"cpu": "1",
"memory": "2Gi"
},
"requests": {
"cpu": "500m",
"memory": "1Gi"
},
"containerName": "test"
}
],
"deploymentName": "test",
"namespace": "default"
},
{
"containers": [
{
"lowerBound": {
"cpu": "12m",
"memory": "131072k"
},
"upperBound": {
"cpu": "49m",
"memory": "131072k"
},
"target": {
"cpu": "12m",
"memory": "131072k"
},
"uncappedTarget": {
"cpu": "12m",
"memory": "131072k"
},
"limits": null,
"requests": null,
"containerName": "test3b"
},
{
"lowerBound": {
"cpu": "12m",
"memory": "131072k"
},
"upperBound": {
"cpu": "49m",
"memory": "131072k"
},
"target": {
"cpu": "12m",
"memory": "131072k"
},
"uncappedTarget": {
"cpu": "12m",
"memory": "131072k"
},
"limits": {
"cpu": "1",
"memory": "2Gi"
},
"requests": {
"cpu": "500m",
"memory": "1Gi"
},
"containerName": "test3a"
}
],
"deploymentName": "test3",
"namespace": "default"
},
{
"containers": [
{
"lowerBound": {
"cpu": "12m",
"memory": "131072k"
},
"upperBound": {
"cpu": "48m",
"memory": "131072k"
},
"target": {
"cpu": "12m",
"memory": "131072k"
},
"uncappedTarget": {
"cpu": "12m",
"memory": "131072k"
},
"limits": null,
"requests": null,
"containerName": "test2a"
},
{
"lowerBound": {
"cpu": "12m",
"memory": "131072k"
},
"upperBound": {
"cpu": "48m",
"memory": "131072k"
},
"target": {
"cpu": "12m",
"memory": "131072k"
},
"uncappedTarget": {
"cpu": "12m",
"memory": "131072k"
},
"limits": {
"cpu": "50m",
"memory": "128Mi"
},
"requests": {
"cpu": "10m",
"memory": "64Mi"
},
"containerName": "test2b"
}
],
"deploymentName": "test2",
"namespace": "default"
}
],
"namespaces": [
"default"
]
}