简体   繁体   中英

Kubernetes ingress: Not creating an LB?

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!

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

Have you deployed nginx ingress deployment first ? example :

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

reference

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM