Open WMP opened 5 years ago
^ @aledbf You're the ingress-nginx expert 😄
Not ideal, but solution.Problem with keepalived-vip internal load-balancer, if you give your service ports 80 and 8080, keepalived balances all traffic to 8080 port, which is default-http-backend
on all nodes.
So you shoud use some not used port and create "fake" service then it works fine!
Example of service:
apiVersion: v1
kind: Service
metadata:
annotations:
field.cattle.io/creatorId: user-xnk2m
field.cattle.io/ipAddresses: "null"
field.cattle.io/targetDnsRecordIds: "null"
field.cattle.io/targetWorkloadIds: "null"
creationTimestamp: "2019-08-15T07:35:52Z"
labels:
cattle.io/creator: norman
name: fake-ingress-nginx
namespace: ingress-nginx
resourceVersion: "11402054"
selfLink: /api/v1/namespaces/ingress-nginx/services/ingress-nginx
uid: 4f502845-bf2f-11e9-adf6-fa5dfa1eaaf6
spec:
clusterIP: 10.43.181.3
ports:
- name: http
port: 65530
protocol: TCP
targetPort: 8080
selector:
app: default-http-backend
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
I have k8s on rancher 2.0 and i need to expose ingress-nginx on keepalived-vip. This is my configuration:
I create service ingress-nginx/ingress-nginx with this config:
From rancher i have DeploymentSet ingress-nginx:
When i get http request to nodeIp all works good (yes, this is answer from app):
But when i try this same on vIP i have 404:
What i should set to get property answer from ingress?