Kubernetes ingress: Not creating an LB?

我们两清 提交于 2019-12-24 18:23:29

问题


I have an EKS cluster. We want - One LB that will redirect to multiple namespace inside the cluster, - Ingress to avoid the "one load balancer for one service". I want to cut it by namespace.

I have been reading a bit of documentation but I can't seem to wrap my head around it. I have this yaml, which I understood would create a LB and the ingress rules.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: simple-fanout-example
  namespace : default
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: domain.com
    http:
      paths:
      - path: /blabla
        backend:
          serviceName: blabla
          servicePort: 8000
      - path: /bleble
        backend:
          serviceName: bleble
          servicePort: 8000

This create successfully the ingress but... Nothing else happens?

I'm unsure what I'm missing, would really appreciate some help. Thamks!


回答1:


This would not create a LB. Ingress is just a routing rule for your ingress controller. Think of it like a location block in your nginx config. A K8S Service with Load Balancer type would create a LB in AWS.

You could get more understanding from my other answer here: AWS VPC - k8s - load balancing




回答2:


Have you deployed nginx ingress deployment first ? example :

helm install stable/nginx-ingress --namespace kube-system

reference



来源:https://stackoverflow.com/questions/56459127/kubernetes-ingress-not-creating-an-lb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!