cni-metrics-helper

by Helm

Helm chartv1.23.3App v1.23.3

A Helm chart for the AWS VPC CNI Metrics Helper

About this chart

CNI METRICS HELPER

This chart provides a Kubernetes deployment for the Amazon VPC CNI Metrics Helper, which is used to collect metrics for the Amazon VPC CNI plugin for Kubernetes.

Prerequisites

  • Kubernetes 1.11+ running on AWS
  • Helm 3.0+

Installing the Chart

First add the EKS repository to Helm:

$ helm repo add eks https://aws.github.io/eks-charts

Ensure helm repository up to date

$ helm repo update eks

To identify the version you are going to apply

$ helm search repo eks/cni-metrics-helper --versions

To install the latest chart with the release name cni-metrics-helper and default configuration:

$ helm install cni-metrics-helper --namespace kube-system eks/cni-metrics-helper

To install manually, clone the Amazon VPC CNI for Kubernetes repository to your local machine:

$ git clone https://github.com/aws/amazon-vpc-cni-k8s.git

Use the helm install command to install the chart into your Kubernetes cluster:

$ helm install cni-metrics-helper --namespace kube-system ./charts/cni-metrics-helper

To uninstall:

$ helm uninstall cni-metrics-helper --namespace kube-system

Configuration

The following table lists the configurable parameters for this chart and their default values.

ParameterDescriptionDefault
affinityMap of node/pod affinities{}
fullnameOverrideOverride the fullname of the chartcni-metrics-helper
image.tagImage tagv1.23.3
image.domainECR repository domainamazonaws.com
image.regionECR repository region to use. Should match your clusterus-west-2
image.accountECR repository account number602401143452
env.USE_CLOUDWATCHWhether to export CNI metrics to CloudWatchtrue
env.USE_PROMETHEUSWhether to export CNI metrics to Prometheusfalse
env.AWS_CLUSTER_IDID of the cluster to use when exporting metrics to CloudWatchdefault
env.AWS_VPC_K8S_CNI_LOGLEVELLog verbosity level (ie. FATAL, ERROR, WARN, INFO, DEBUG)INFO
env.METRIC_UPDATE_INTERVALInterval at which to update CloudWatch metrics, in seconds.
Metrics are published to CloudWatch at 2x the interval30
serviceAccount.nameThe name of the ServiceAccount to usenil
serviceAccount.createSpecifies whether a ServiceAccount should be createdtrue
serviceAccount.annotationsSpecifies the annotations for ServiceAccount{}
podAnnotationsSpecifies the annotations for pods{}
revisionHistoryLimitThe number of revisions to keep10
podSecurityContextSecurityContext to set on the pod{}
containerSecurityContextSecurityContext to set on the container{}
tolerationsOptional deployment tolerations[]
updateStrategyOptional update strategy{}
imagePullSecretsDocker registry pull secret[]
nodeSelectorNode labels for pod assignment{}
tolerationsOptional deployment tolerations[]

Specify each parameter using the --set key=value[,key=value] argument to helm install or provide a YAML file containing the values for the above parameters:

$ helm install cni-metrics-handler --namespace kube-system eks/cni-metrics-handler --values values.yaml

Manual install:

$ helm install cni-metrics-helper --namespace kube-system ./charts/cni-metrics-helper --values values.yaml

Resources

ParameterDescriptionDefault
resourcesResources for the pods.{}

For example, to set a CPU limit of 200m and a memory limit of 256Mi for the cni-metrics-helper pods, you can use the following command:

$ helm install cni-metrics-helper ./charts/cni-metrics-helper --namespace kube-system --set resources.limits.cpu=200m,resources.limits.memory=256Mi

Deploy cni-metrics-helper with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cni-metrics-helper 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 chartcni-metrics-helper is pinned at v1.23.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