I have created a simple application which should show some message. On HTTP it's working well, but when requesting from 443 getting the default backend? what I have missed?
My Ingress :
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: echo-ingress
namespace: echo-test
annotations:
kubernetes.io/ingress.class: "haproxy"
kubernetes.io/tls-acme: "true"
ingress.kubernetes.io/ssl-redirect: "true"
spec:
tls:
- hosts:
- echo1.test.com
secretName: echo-tls
rules:
- host: echo1.test.com
http:
paths:
- path: /
backend:
serviceName: httpd-echo1
servicePort: 5678
My service :
apiVersion: v1
kind: Service
metadata:
namespace: echo-test
name: httpd-echo1
labels:
run: httpd-echo
spec:
ports:
- port: 5678
targetPort: 5678
protocol: TCP
selector:
app: httpd
My deployment :
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpd-echo1
namespace: echo-test
spec:
selector:
matchLabels:
app: httpd
replicas: 2
template:
metadata:
labels:
app: httpd
spec:
containers:
- name: httpd
image: hashicorp/http-echo
args:
- "-text=test1"
ports:
- containerPort: 5678
HTTP is return "test1" but HTTPS returing default backend - not found Should I create separate ingress for this?
P.S. TLS I have created and pushed to secret, so using here only name