I am able to configure Nginx for NodePort and access it, but when I configure Load Balancer and Target Group for Nginx I am not able to access. I think I am doing something wrong and I cannot troubleshoot it as I am quite new to Kubernetes.
nginx-service.yaml
apiVersion: v1
kind: Service
metadata:
name: nginx-service
labels:
app: nginx
svc: test-nginx
spec:
type: LoadBalancer
selector:
app: nginx
ports:
- protocol: TCP
port: 8080
targetPort: 80
nodePort: 30000
Load Balancer and Target group configuration
CodePudding user response:
You need to use ingress controller to do the same thing. That will automatically create the load balancer and target group from the file itself.
You can watch the videos and tutorials for the same.
CodePudding user response:
Your image attachment indicated that your ALB was attached with the VPC default security group. Your EC2 instance security group will need to have inbound rule for the default security group for connectivity. You can automate this process by using the AWS LB Controller.