简体   繁体   中英

Is there any way to use existing AWS ELB for ingress in Kubernetes for airflow helm chart?

Planning to host airflow on Kube.netes (EKS), using the official helm chart. But the problem is it doesn't provide any way to use existing ELB. And as soon as I delete the release, it deletes the ELB created for ingress. Is there any way i can pass the elb address and create ingress upon it?

You can use TargetGroupBinding to connect a service to an existing load balander.

apiVersion: elbv2.k8s.aws/v1beta1
kind: TargetGroupBinding
metadata:
  name: my-tgb
spec:
  serviceRef:
    name: <airflow-service-name>
    port: 80
  targetGroupARN: <arn-to-targetGroup>

Example taken from here: https://kube.netes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/targetgroupbinding/targetgroupbinding/#sample-yaml

If you wanted to retain the existing resource during the recreation, You could use below annotation in the template files to avoid helm to recreate.

helm.sh/resource-policy=keep

Something like this, This would retain the istio-ingressgateway NLB resource.

kubectl annotate svc -n istio-system istio-ingressgateway helm.sh/resource-policy=keep

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