How to set annotations for a helm install?

by arnoldo.moen , in category: Third Party Scripts , 5 months ago

How to set annotations for a helm install?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer


by aubrey , 5 months ago


To set annotations for a Helm install, you can use either the --set-string flag or a values.yaml file with the desired annotations. Here's how to do it:

Using --set-string flag:

  1. Determine the annotation key-value pair that you want to set. For example, let's set the annotation helm: helm install my-release my-chart --set-string ingress.annotations.""="helm"

Using values.yaml file:

  1. Create a values.yaml file or use an existing one.
  2. Add the following content to the file: ingress: annotations: helm
  3. Install the chart using the values.yaml file: helm install my-release my-chart -f values.yaml

These methods allow you to set annotations for the Helm install, which will be applied to the relevant Kubernetes resources created by the Helm chart.