简体   繁体   English

有没有办法将配置传递给Nginx Ingress Controller

[英]Is there a way to pass through configurations to Nginx Ingress Controller

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. 具体来说,我想注入“ ssl_password_file”选项,但我找不到这样做的Ingress注释。

Any help would be appreciated! 任何帮助,将不胜感激!

I am running the Nginx Ingress Controller on an AWS EKS cluster. 我在AWS EKS集群上运行Nginx Ingress Controller。

You can simnply do it by adding annotation in ingress object. 您可以通过在入口对象中添加注释来简单地做到这一点。

https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/ 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM