Assuming you mean, prometheus running inside a docker container or a pod on a k8s cluster, expose them via Kubernetes service and use the API. For recording, I hope
recording rules are what you are looking for. Also, if this doesn't answer your question, kindly mention more details as per the requirements. Trying seeing
docker daemon exporter if you are concerned with docker.