By napso
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 ?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.