Question: I am trying to optimize the CPU resources allocated to a pod based on previous runs of that pod. 

The only problem is that I have only been able to find how much CPU is allocated to a given pod, not how much CPU a pod is actually using.

Answer: 
I may be reading too much into how the question is worded: (quote) "how much CPU a pod is actually using"...even though the question also mentions (quote) "to optimize...based on previous runs". So:

For usage history - see Rico's answer.

For current usage, see [`kubectl top`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-pod-em-). Use `watch` to see usage stats every 2 seconds without having to run the command over and over. For example:

```
watch kubectl top pod <pod-name> --namespace=<namespace-name>

```

This can be helpful, too: <https://kubernetes.io/docs/tasks/debug-application-cluster/resource-usage-monitoring/#resource-metrics-pipeline>
From docker, you can query a container with `docker stats`. To show the instantaneous stats, including CPU, memory, and network usage, of all containers:

```
docker stats --no-stream

```

For gathering the metrics over time, cAdvisor, Prometheus, and Grafana together are a common open source metrics gathering, storage, and viewing set of tools.