Is there a way to pass through configurations to Nginx Ingress Controller

1/11/2019

I’m wondering if there is any way apart from ingress annotations to pass configurations into the Ingress-controller pod.

Specifically I want to inject the “ssl_password_file” option, but I cannot find an Ingress annotation to do so.

Any help would be appreciated!

I am running the Nginx Ingress Controller on an AWS EKS cluster.

-- CZchizhang
kubernetes
nginx-ingress
ssl

1 Answer

2/5/2019

You can simnply do it by adding annotation in ingress object.

https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/

for example

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-ingress
  annotations:  
    kubernetes.io/ingress.class: nginx
    certmanager.k8s.io/cluster-issuer: secret
spec:
  tls:
  - hosts:
    - host
    secretName: secret
  rules:
  - host: host
    http:
      paths:
      - backend:
          serviceName: service
          servicePort: 80
-- Harsh Manvar
Source: StackOverflow