Kubernetes service load balancer "No route to host" error

12/10/2018

I'm trying to expose a pod using a load balancer service. The service was created successfully and an external IP was assigned. When I tried accessing the external in the browser the site is no and I got ERR_CONNECTION_TIMED_OUT. Please see the yaml below:

apiVersion: v1
kind: Service
metadata:
  labels:
    name: service-api
  name: service-api
spec:
  externalTrafficPolicy: Cluster
  ports:
  - nodePort: 30868
    port: 80
    protocol: TCP
    targetPort: 9080
    name: http
  selector:
    name: service-api
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}

I also tried creating the service using kubernetes CLI still no luck.

-- Alec Jones
azure
azure-kubernetes
kubernetes

0 Answers