Nginx ingress controller and server

22 views
Skip to first unread message

amit.c...@gmail.com

unread,
Jun 29, 2018, 6:57:26 PM6/29/18
to Kubernetes user discussion and Q&A
Hi,
I am using nginx ingress controller on AWS and want to use it as a server too. Is that possible? Do i always have to create another nginx(or some other web-server) and route the default path to it?
Here is my ingress YAML file:

```
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: grpc-ingress
namespace: nginx-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
tls:
- hosts:
- test.local.com
secretName: default-server-secret

rules:
- host: test.local.com
http:
paths:
- path: /v1/blah/
backend:
serviceName: blah-service
servicePort: 8081
-path: /
backend:
serviceName: web-service
servicePort: 8082
```

However, is there any way, the ingress controller can serve as web-server? and if i have put in the nginx config like this

```
server {
location / {
root /data/www;
}
}
```
inside the controller, where can i do that? Should it be in the configmap??


Thanks and any help is appreciated.

Amit

Reply all
Reply to author
Forward
0 new messages