cadvisor

by ckotzbauer

Helm chartv2.4.3App 0.52.1Verified publisher

A chart for a Cadvisor deployment

About this chart

cAdvisor

A chart for a cAdvisor deployment

Learn more: https://github.com/google/cadvisor

TL;DR;

$ helm install ckotzbauer/cadvisor

Introduction

This chart creates a daemonset on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.10+

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release ckotzbauer/cadvisor

The command deploys cAdvisor on the Kubernetes cluster using the default configuration. The configuration section lists the parameters that can be configured during installation.

Upgrading from v1.x to v2.x

  • metrics.relabelings was renamed to metrics.metricsRelabelings to match the ServiceMonitor CRD naming

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the cAdvisor chart and their default values.

ParameterDescriptionDefault
image.repositorycontainer image repositorygcr.io/cadvisor/cadvisor
image.tagcontainer image tagv0.52.1
image.pullPolicycontainer image pull policyIfNotPresent
image.pullSecretscontainer image pull secrets[]
nodeSelectornode labels for pod assignment{}
tolerationsnode tolerations for pod assignment[]
affinitynode affinity for pod assignment{}
container.portthe container and service port to use8080
container.additionalArgsadditional container argumentssee values.yaml
container.hostPathshostPaths to mount in the containersee values.yaml
resourcespod resource requests & limits{}
serviceAccount.createcreate a own serviceAccount for the podtrue
serviceAccount.namename of the serviceAccount to create""
daemonsetAnnotationsannotations for the daemonset{}
podAnnotationsannotations for the daemonset pods{}
podLabelslabels for the daemonset pods{}
priorityClassNamepriority classes name for the pod{}
podSecurityPolicy.createcreate a own PodSecurityPolicy for the podfalse
podSecurityPolicy.privilegedcreate the PodSecurityPolicy as privilegedfalse
podSecurityContext.createcreate the podSecurityContext in container specfalse
podSecurityContext.privilegedset podSecurityContext privileged to truefalse
metrics.enabledcreate ServiceMonitor CR for Prometheus operatorfalse
metrics.relabelingsadd pre-scraping relabeling to ServiceMonitor[]
metrics.intervalscraping interval for the ServiceMonitor30s
metrics.scrapeTimeoutscraping timeout for the ServiceMonitor30s
metrics.metricsRelabelingsadd pre-ingestion relabeling to ServiceMonitor[]

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

$ helm install --name my-release \
    --set key_1=value_1,key_2=value_2 \
    ckotzbauer/cadvisor

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

# example for staging
$ helm install --name my-release -f values.yaml ckotzbauer/cadvisor

Tip: You can use the default values.yaml

Centos, Fedora and RHEL

You may need to run the container with additional configuration. Please see this article.

Deploy cadvisor with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cadvisor on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcadvisor is pinned at v2.4.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply