Using gitlab auto DevOps CI, it had set up ingress controller:
spec:
rules:
- host: api.example.com
http:
paths:
- backend:
serviceName: production-auto-deploy
servicePort: 5000
path: /
tls:
- hosts:
- api.example.com
secretName: production-auto-deploy-tls
status:
loadBalancer:
ingress:
- ip: xxx.xxx.xxx.xxx
http://api.example.com works great, but https://api.example.com first gives me certificate error, and then after I add the exception I get 404 from Google Kubernetes Engine.
Why is the TLS certificate not configured right?
Why doesn't it direct the host to the service?
Load balancer
apiVersion: v1
kind: Service
spec:
clusterIP: xxx.xxx.xxx.xxx
externalTrafficPolicy: Cluster
ports:
- name: http
nodePort: 30408
port: 80
protocol: TCP
targetPort: http
- name: https
nodePort: 31101
port: 443
protocol: TCP
targetPort: https
selector:
app: nginx-ingress
component: controller
release: ingress
sessionAffinity: None type: LoadBalancer status: loadBalancer: ingress: - ip: xxx.xxx.xxx.xxx
Ingress
apiVersion: v1
kind: Service
spec:
clusterIP: xxx.xxx.xxx.xxx
ports:
- name: http
port: 80
protocol: TCP
targetPort: http
selector:
app: nginx-ingress
component: default-backend
release: ingress
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
Ingresscontroller: ingress by kubernetes, Nginx, Traefik - Konstantin Vustin