Configure nginx using a ConfigMap
This commit is contained in:
parent
28f9cb0b2b
commit
d9934ec4db
17 changed files with 378 additions and 417 deletions
|
|
@ -21,9 +21,6 @@ spec:
|
|||
# Follow this https://github.com/bprashanth/Ingress/blob/master/examples/sni/nginx/test.sh
|
||||
# as a guide on how to generate secrets containing SSL certificates.
|
||||
volumes:
|
||||
- name: secret-echoheaders-1
|
||||
secret:
|
||||
secretName: echoheaders
|
||||
- name: dhparam-example
|
||||
secret:
|
||||
secretName: dhparam-example
|
||||
|
|
@ -60,8 +57,6 @@ spec:
|
|||
- containerPort: 8080
|
||||
hostPort: 9000
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nginx-ssl/secret-echoheaders-1
|
||||
name: secret-echoheaders-1
|
||||
- mountPath: /etc/nginx-ssl/dhparam
|
||||
name: dhparam-example
|
||||
# the flags tcp-services is required because Ingress do not support TCP rules
|
||||
|
|
@ -69,7 +64,5 @@ spec:
|
|||
# containerPort 8080 is mapped to 9000 in the node.
|
||||
args:
|
||||
- /nginx-third-party-lb
|
||||
- --tcp-services=default/example-go:8080
|
||||
- --tcp-services-configmap=default/tcp-configmap-example
|
||||
- --default-backend-service=default/default-http-backend
|
||||
- --custom-error-service=default/default-error-backend
|
||||
|
||||
|
|
|
|||
|
|
@ -14,14 +14,6 @@ spec:
|
|||
k8s-app: nginx-ingress-lb
|
||||
name: nginx-ingress-lb
|
||||
spec:
|
||||
# A secret for each nginx host that requires SSL. These secrets need to
|
||||
# exist before hand, see README.
|
||||
# Follow this https://github.com/kubernetes/contrib/Ingress/controllers/nginx-third-party/examples/certs.sh
|
||||
# as a guide on how to generate secrets containing SSL certificates.
|
||||
volumes:
|
||||
- name: secret-echoheaders-1
|
||||
secret:
|
||||
secretName: secret-echoheaders-1
|
||||
containers:
|
||||
- image: gcr.io/google_containers/nginx-third-party:0.4
|
||||
name: nginx-ingress-lb
|
||||
|
|
@ -54,10 +46,6 @@ spec:
|
|||
hostPort: 4444
|
||||
- containerPort: 8080
|
||||
hostPort: 9000
|
||||
# the mountpoints for the SSL secrets must be a /etc/nginx-ssl subdirectory
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nginx-ssl/secret-echoheaders-1
|
||||
name: secret-echoheaders-1
|
||||
# to configure ssl_dhparam http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_dhparam
|
||||
# use the dhparam.sh file to generate and mount a secret that containing the key dhparam.pem or
|
||||
# create a configuration with the content of dhparam.pem in the field sslDHParam.
|
||||
|
|
|
|||
|
|
@ -55,3 +55,4 @@ spec:
|
|||
args:
|
||||
- /nginx-third-party-lb
|
||||
- --default-backend-service=default/default-http-backend
|
||||
- --tcp-services-configmap=default/tcp-configmap-example
|
||||
|
|
|
|||
6
controllers/nginx-third-party/examples/tcp-configmap-example.yaml
vendored
Normal file
6
controllers/nginx-third-party/examples/tcp-configmap-example.yaml
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: tcp-configmap-example
|
||||
data:
|
||||
9000: "default/example-go:8080"
|
||||
Loading…
Add table
Add a link
Reference in a new issue