How to set annotations for a helm install?

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

How to set annotations for a helm install?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by aubrey , 8 months ago

@arnoldo.moen 

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 mycompany.com/created-by: helm: helm install my-release my-chart --set-string ingress.annotations."mycompany.com/created-by"="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: mycompany.com/created-by: 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.