Setting nested data structures from helm command line?

The helm docu has a section The Format and Limitations of --set, which contains what you are looking for.

--set outer.inner=value results in:

outer:
  inner: value

Therefore your whole helm command looks like this:

helm install --set annotations.foo=bar,annotations.bash=baz stable/prometheus-redis-exporter

Just to add, if you are looking to override a key with a "." in the key name, add a back slash ("\") before the ".".

for example, with values (taken from grafana):

grafana.ini:
  server:
    root_url: https://my.example.com

To edit the root_url value we would pass --set grafana\.ini.server.root_url=https://your.example.com