Kubernetes Ingress not resolving backend service

0 votes

I've created an ingress and pointed it to service type NodePort, But when i describe the ingress, the backend IP sjows <none>.

This is my deployment yaml

apiVersion: v1
kind: Namespace
metadata:
  name: proxy
  labels:
   name: proxy
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: deployment
  namespace: proxy
  labels:
    app: proxy
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: proxy
    spec:
      containers:
      - name: proxy
        image: wildapplications/proxy:latest
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8080
      imagePullSecrets:
        - name: regsecret
---
apiVersion: v1
kind: Service
metadata:
  name: service
  namespace: proxy
spec:
  type: NodePort
  ports:
  - port: 8080
    targetPort: 8080
  selector:
    app: proxy
  externalName: proxy
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress
  namespace: proxy
  annotations:
    ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: echo.example.com
    http:
      paths:
      - path: /test
        backend:
          serviceName: service
          servicePort: 8080

when I describe the ingress I get

Name:             ingress
Namespace:        proxy
Address:          192.168.99.100
Default backend:  default-http-backend:80 (172.17.0.14:8080)
Rules:
  Host              Path  Backends
  ----              ----  --------
  echo.example.com  
                    /test   service:8080 (<none>)
Annotations:
  rewrite-target:  /
Events:
  Type    Reason  Age   From                Message
  ----    ------  ----  ----                -------
  Normal  CREATE  16m   ingress-controller  Ingress proxy/ingress
  Normal  CREATE  15m   ingress-controller  Ingress proxy/ingress
  Normal  UPDATE  15m   ingress-controller  Ingress proxy/ingress

Oct 1, 2018 in Kubernetes by lina
• 8,220 points
2,284 views

1 answer to this question.

0 votes

I think you're trying to access the ingress through my minikube ip address (minikube ip to get the ip), this will probable provide a 404

To solve the 404, execute

echo "$(minikube ip) echo.example.com" | sudo tee -a /etc/hosts

and then from there navigating to the host url in my browser.

answered Oct 1, 2018 by Kalgi
• 52,350 points

Related Questions In Kubernetes

0 votes
1 answer

Defining a fallback service for Kubernetes ingress

For the Nginx Ingress Controller there is ...READ MORE

answered Sep 11, 2018 in Kubernetes by Kalgi
• 52,350 points
2,403 views
0 votes
1 answer

Kubernetes ingress unhealthy backend

Add a readinessProbe(copy your livenessProbe). It's explained ...READ MORE

answered Jan 16, 2019 in Kubernetes by DareDev
• 6,890 points
7,256 views
+5 votes
2 answers

Redirecting host to service path in kubernetes

What you are trying to do is ...READ MORE

answered Mar 27, 2018 in Kubernetes by DragonLord999
• 8,450 points
3,599 views
0 votes
2 answers

How can I access a service installed on Kubernetes from anywhere?

if u want to directly want to ...READ MORE

answered Jul 26, 2020 in Kubernetes by Akash Gupta
1,354 views
+1 vote
1 answer
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 52,350 points
1,422 views
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,561 views
0 votes
1 answer

kubernetes ingress not accessible

You need to set up an ingress ...READ MORE

answered Sep 7, 2018 in Kubernetes by Kalgi
• 52,350 points
1,455 views
0 votes
2 answers

Not able to expose port 80 on the host, kubernetes ingress

I was facing the same error. The nginix ...READ MORE

answered Sep 11, 2018 in Kubernetes by Kalgi
• 52,350 points
2,148 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP