kubernetes nginx ingress giving 503 and 404

4/24/2018

While creating Ingress rules to the existing APIs is using TLS mandatory?

I am getting 404 and 503 error codes to all the APIs except given without any path.

I am using nginx ingress controller.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: hello-world-ing
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
  - http:
      paths:
      - path: /test
        backend:
          serviceName: example-project
          servicePort: 8085

This is the ingress rule I created:

gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.10 - version of controller

-- hemaamahad
kubernetes
nginx

2 Answers

4/24/2018

In K8s nginx-ingress. By default some nginx have we configured that may block your service.

kubectl describe configMap nginx-configuration -n ingress-nginx 

https://github.com/kubernetes/ingress-nginx/blob/146db437945a130d675540285fe02fa9639ba1f0/docs/user-guide/configmap.md

-- Ravichandra
Source: StackOverflow

8/11/2019

example-project must be of type NodePort. Because by default is ClusterIP

apiVersion: v1
kind: Service
metadata:
  name: example-project
...
spec:
  type: NodePort
  ports:
...
-- Miguel SS
Source: StackOverflow