Hello, i’m having troubles setting up ingress nginx in a cluster.
I tried following a lot of different guides and i can’t seem to get past a “default backend - 404” error.
I’m running a private network cluster with just a master and a worker.
Here is my ingress:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
ingress.kubernetes.io/rewrite-target: /
name: nginx-ingress
namespace: default
spec:
rules:
- host: km1
http:
paths:
- backend:
serviceName: nginx
servicePort: 80
path: /
Here the ingress service:
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: nginx-ingress
chart: nginx-ingress-0.3.0
component: controller
heritage: Tiller
release: nginx-ingress-release
name: nginx-ingress-release-controller
selfLink: /api/v1/namespaces/default/services/nginx-ingress
spec:
externalTrafficPolicy: Local
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80 - name: https
port: 443
protocol: TCP
targetPort: 443
selector:
app: nginx-ingress-release-controller
component: controller
release: nginx-ingress-release
sessionAffinity: None
type: NodePort
status:
loadBalancer: {}
The service i’m trying to call is just a regular nginx service, i tried with a different one and it had the same problems.
Is there anything i can check or anything i might be doing wrong?.