I created with NodePort and target-type=instance for my-nginx server Created Ingress with alb annotation of aws. It got an Application Load Balancer attached.
I also created once more service with ClusterIp and Ingress for it. No Load Balancer.
In the AWS Documentation : https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html It says that the target-type: instance needs NodePort but for target-type: IP nothing is mentioned.
Q1. EKS ALB not attached to the Ingres with Service type ClusterIp and target-type = IP. Is NodePort Mandatory
This is the yaml for Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: kubernetes-dashboard
name: kubernetes-dashboard
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/group.name: "all-http-pods"
spec:
defaultBackend:
service:
name: kubernetes-dashboard
port:
number: 443
Q2. When I deploy the ALB Controller to private subnets, It doesn't create the ALB for NodePort as well. When I tried again, the controller deployed to public subnet and then it created ALB for NodePort Service type. Is it necessary that controllers are deployed to public subnet.
Q3. What is the difference between target-type: instance and target-type: IP? This one, I googled but I didn't get any clear idea.
Need help in understanding the above mentioned questions.
Thank you