minkube kubernetes ingress loadbalancer routing to default backend with TLS

69 views
Skip to first unread message

dcs3spp

unread,
Jun 12, 2018, 12:01:32 PM6/12/18
to Kubernetes user discussion and Q&A
Hi,

I am struggling to get Kubernetes ingress controller working with minikube on a local development environment.

I am trying to get ingress loadbalancer to provide TLS termination. Two paths are defined for the controller:
1. angular-service: deployed in an nginx instance
2. auth-server: deployed in a node express instance

For the angular-service I have tried ports 80 and 443 to no avail.
No matter what I try it routes to the default-backend with 404 for both paths.

Any ideas how to get it working so that routes to each individual path?

e.g. curl https://192.168.64.7/ and curl https://192.168.64.7/auth/ping , currently both result in default backend and 404.


#
# Ingress
#
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: api
annotations:
ingress.kubernetes.io/rewrite-target: /
ingress.kubernetes.io/ssl-redirect: "false"
kubernetes.io/ingress.allow-http: "false"
#ingress.kubernetes.io/ssl-passthrough: "true"
#ingress.kubernetes.io/secure-backends: "true"
kubernetes.io/ingress.class: nginx

spec:
tls:
- secretName: tls-secret

rules:
- host:
http:
paths:
- path: /*
backend:
serviceName: angular-service
servicePort: 80
- path: /auth/*
backend:
serviceName: auth-server-service
servicePort: 4433

dcs3spp

unread,
Jun 13, 2018, 2:21:14 PM6/13/18
to Kubernetes user discussion and Q&A
Solved it. The problem was caused by incorrect targetPort setting in service.
Reply all
Reply to author
Forward
0 new messages