Nginx(OpenResty) to Reverse Proxy Kubernetes Services
See full example here https://github.com/mingfang/jenkins-seed/blob/master/knginx.yml
- name: knginx
ports:
- {port: 80, name: http}
- {port: 443, name: https}
containers:
- name: knginx
image: rebelsoft.com/knginx:latest
Sample Service Using HTTPBIN
- name: httpbin
ports:
- port: 5000
annotations:
nginx:
- http:
- server: default
paths:
- path: /
containers:
- name: httpbin
image: rebelsoft.com/httpbin:latest
..
annotations:
nginx:
- http:
- server: httpbin.*
paths:
- path: /
..
Add to Knginx Definition
..
env:
- {name: SAML_IDP_URL, value: "http://<YOUR DOMAIN>/auth/realms/master/protocol/saml/clients/saml"}
..
Note: The SAML URL is provided by your IDP. Try https://github.com/mingfang/docker-keycloak.
Add to Knginx Definition
..
env:
- {name: LETSENCRYPT_DOMAINS, value: "www.rebelsoft.com|rebelsoft.com"}
..
Add to Knginx Definition
..
env:
- {name: ENABLE_WAF, value: "yes"}
..