Deployment

Although historically the cAdvisor code was embedded in the Kubelet binary, it is currently scheduled to be deprecated there. Therefore, we'll be launching cAdvisor as a DaemonSet to future proof this example and to expose its configurations, while also enabling its web interface, as a Kubernetes service, to be explored.

Ensure you move into the correct repository path as shown here:

cd ./chapter06/provision/kubernetes/

Next, we must create a DaemonSet, because we want cAdvisor running in every single node:

apiVersion: apps/v1kind: DaemonSetmetadata:  name: cadvisor  namespace: monitoring...

Notice all the volume mounts allowing the collection of data from the Docker daemon and various Linux resources as shown here:

...    spec: containers: ...

Get Hands-On Infrastructure Monitoring with Prometheus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.