We'll be building upon the Kubernetes test environment started previously. In this particular scenario, we'll deploy an instance of Pushgateway and we'll be adding it as a target in Prometheus. To validate the correctness of our setup, we'll create a Kubernetes CronJob to emulate a batch job style of workload, and push its metrics to the Pushgateway service to ensure Prometheus collects our data.
To begin the deployment, ensure you move into the correct repository path, relative to the code repository root:
cd ./chapter06/provision/kubernetes/
To deploy an instance of Pushgateway, you can use the following manifest. Keep in mind that this service does not support high availability or clustering:
apiVersion: apps/v1kind: Deployment ...