How to pass key/value in Helm via --set

10/26/2019

I'd like to setup a NGINX Ingress Controller using the flag --set for the value controller.service.labels: any hint how to pass a multiple key/value argument to reach the desired result?

--- 
apiVersion: v1
kind: Service
metadata: 
  labels: 
    foo: bar   <<< my controller.service.labels passed via --set
    bizz: buzz <<<
    app: nginx-ingress
    chart: nginx-ingress-1.24.3
    component: controller
    heritage: Tiller
    release: ingress-controller
  name: ingress-controller-nginx-ingress-controller
spec: 
  clusterIP: ""
  ports: 
    - 
      name: http
      port: 80
      protocol: TCP
      targetPort: http
    - 
      name: https
      port: 443
      protocol: TCP
      targetPort: https
  selector: 
    app: nginx-ingress
    component: controller
    release: ingress-controller
  type: NodePort
-- prometherion
kubernetes-helm

1 Answer

10/26/2019

Found the solution :)

--set controller.service.labels.foo="bar" \
--set controller.service.labels.bizz="buzz"

Easy peasy!

-- prometherion
Source: StackOverflow