kubernetes ingress not accessible

0 votes

I have a small kubernetes cluster on localhost in linux. 

 In my deployment file I defined an ingress, which should make the services, which are deployed in the cluster, accessible from the outside. Deployment.yml:

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: foo-service-deployment
spec:
  replicas: 2
  template:
    metadata:
      labels:
        app: foo-service
    spec:
      containers:
        - name: foo-service
          image: images/fooservice
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 7778
---
apiVersion: v1
kind: Service
metadata:
  name: foo-service-service
spec:
  ports:
    - port: 7778
  selector:
    app: foo-service
  type: NodePort
---    
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: api-gateway-ingress
spec:
  rules:
  - host:
    http:
      paths:
      - path: /foo
        backend:
          serviceName: foo-service-service
          servicePort: 7779
      - path: /bar
        backend:
          serviceName: bar-service-service
          servicePort: 7776

I can not access the services. kubectl describe shows the following for my ingress:

Name:           api-gateway-ingress
Namespace:      default
Address:        
Default backend:    default-http-backend:80 (<none>)
Rules:
  Host  Path    Backends
  ----  ----    --------
  * 
        /foo    foo-service-service:7779 (<none>)
        /bar    bar-service-service:7776 (<none>)
Annotations:
Events: <none>

Whats the issue?

Sep 7, 2018 in Kubernetes by lina
• 8,220 points
1,443 views

1 answer to this question.

0 votes

You need to set up an ingress controller for the ingress to work.

Use this documentation from the official website as guidance.

answered Sep 7, 2018 by Kalgi
• 52,350 points

Related Questions In Kubernetes

0 votes
1 answer

Pod not sharing directory - Kubernetes volume Hostpath

he issue was on the volume definition, ...READ MORE

answered Aug 28, 2018 in Kubernetes by Kalgi
• 52,350 points
2,254 views
0 votes
1 answer

Not able to access kubernetes api from a pod in azure

Follow these steps Add --bind-address=0.0.0.0 option to the line https://github.com/kubernetes/kubernetes/blob/v1.2.0/docs/getting-started-guides/coreos/azure/cloud_config_templates/kubernetes-cluster-main-nodes-template.yml#L218  Created ...READ MORE

answered Aug 30, 2018 in Kubernetes by Kalgi
• 52,350 points
1,015 views
0 votes
2 answers

DNS does not resolve with NGINX in Kubernetes

adding to @kalgi's answer Using just the hostname ...READ MORE

answered Aug 30, 2018 in Kubernetes by Nilesh
• 7,060 points
5,621 views
0 votes
1 answer

Error saying "The specified bucket does not exist" in kubernetes

Bucket is created in another region. Looks like ...READ MORE

answered Aug 31, 2018 in Kubernetes by Kalgi
• 52,350 points
4,111 views
+1 vote
1 answer
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,477 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 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,123 views
0 votes
1 answer

Kubernetes Ingress not resolving backend service

I think you're trying to access the ingress ...READ MORE

answered Oct 1, 2018 in Kubernetes by Kalgi
• 52,350 points
2,275 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