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,110 points
374 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
• 41,450 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
• 41,450 points
239 views
0 votes
1 answer

Kubernetes ingress unhealthy backend

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

answered Jan 16 in Kubernetes by DareDev
• 6,810 points
995 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,380 points
100 views
0 votes
1 answer

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

I have followed the link which you have ...READ MORE

answered Jul 23, 2018 in Kubernetes by Atul
• 10,240 points
139 views
0 votes
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
• 41,450 points
68 views
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17 in Others by anonymous
2,507 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
• 41,450 points
25 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
• 41,450 points
78 views