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,231 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,360 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,360 points
2,036 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,360 points
817 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,050 points
5,196 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,360 points
3,814 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
14,627 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,118 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,360 points
1,759 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,360 points
2,093 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