I am running my (kops) kube cluster on AWS. The cluster is in the private subnet. I am not able to create an external (internet facing) load balancer because my cluster is in private space. Is there any way that I can create an internet facing load balancer with my cluster sitting in the private space, if that is not a possible solution how do I expose my service running inside my kube to the outside world?
I am creating with the below annotation for my service
kind: Service
metadata:
name: helloweb
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
If I don't use "-internal" in the annotation the service goes to pending state
Normal EnsuringLoadBalancer 9s (x3 over 24s) service-
controller Ensuring load balancer
Warning CreatingLoadBalancerFailed 8s (x3 over 24s) service-
controller Error creating load balancer (will retry): failed to
ensure load balancer for service default/helloweb: could not find
any suitable subnets for creating the ELB
I have also tried ingress, even ingress is not able to create an external elb. Here's my ingress defenition...
kind: Service
apiVersion: v1
metadata:
name: ingress-nginx
namespace: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
kubectl get ing
NAME HOSTS ADDRESS PORTS AGE
ingress-rules exampleapp1.kubexpress.cloud,exampleapp2.kubexpress.cloud internal-
l0adbalancer.eu-central-1.elb.amazonaws.com 80 10d