I defined my deployment resources
resources:
limits:
cpu: 900m
memory: 2500Mi
now on http://localhost:8001/api 
how can I get the max usage of memory and cpu (in order to handle and define usages and resources well)?
I defined my deployment resources
resources:
limits:
cpu: 900m
memory: 2500Mi
now on http://localhost:8001/api 
how can I get the max usage of memory and cpu (in order to handle and define usages and resources well)?
if you are running on GKE
for now day, the kubernetes console has advanced and you can see all statistics on the console ui
go to https://console.cloud.google.com/kubernetes/list
under workloads choose the deployment
Some tools like kubectl top can only get the resource usage of your pod in current time. You need a monitor service.
kube-state-metrics -> prometheus -> grafana-kubernetes-app is a popular solution to monitor metrics of self deployed k8s cluster.
kube-state-metrics can generates metrics about the state of k8s objects, such as node, pod, deployment.
you just need to trace metrics
kube_pod_container_resource_requests_cpu_coresandkube_pod_container_resource_requests_memory_bytesas the document specified.
peometheus should collect metrics from kube-state-metrics every few seconds and generate time series data.
grafana-kubernetes-app charts them easily. You can find the maximum cpu usage of a given pod then.
A little late to the party, but I created Kube Eagle for exactly this purpose: https://github.com/google-cloud-tools/kube-eagle