I wanted to test out NGINX Ingress Controller one click installation on digital-ocean, so I deployed a very simple app and created several Kubernetes resource as the following:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: app-test
  template:
    metadata:
      labels:
        app: app-test
    spec:
      containers:
        - name: app-test
          image: <my-image-from-docker-hub>
          ports:
            - containerPort: 80
          imagePullPolicy: Always
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: ingress-app-test
spec:
  backend:
    serviceName: app-test
    servicePort: 80
apiVersion: v1
kind: Service
metadata:
  name: app-test
spec:
  selector:
    app: app-test
  ports:
    - port: 80
      targetPort: 80

The container that runs is a very simple web application that works just fine, also port-forwarding to it works just fine.

However, when I try to access the external IP of the load balancer that is deployed as part of the nginx-ingress I expect to see the homepage of the web application but I just get 503 error from nginx.

Looking at the logs of the nginx ingress controller, I can see an error indicating:

Error creating upstream "ingress-nginx-app-test-80": no object matching key "ingress-nginx/app-test" in local store

What I am missing here ?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi there,

Looking around this looks very similar to: https://github.com/kubernetes/ingress-nginx/issues/4579. Perhaps try their solution.

A few things you may want to try:

Hope this helps!

John Kwiatkoski

by Hanif Jetha
In this tutorial, learn how to set up and secure an Nginx Ingress Controller with Cert-Manager on DigitalOcean Kubernetes.
Submit an Answer