Unable to create service type of LoadBalancer for private subnet in AWS

Solution Verified - Updated -

Issue

  • Unable to create service type of LoadBalancer for private subnet in AWS as the service is pending state.
svc-xxx      LoadBalancer   172.30.xx.xx   <pending>      80/TCP,443/TCP    21d
  • The kube-controller-manager pods shows the error:
aws.go:3605] EnsureLoadBalancer(ocp-xxxx, openshift-storage, svc-xxx, us-xxxx-x, [{mgmt TCP <nil> xx {x xxxx } xxxxx} {mgmt-https TCP <nil> xxx {x xxxx } xxxxx} {bg-https TCP <nil> xxxx {x xxxx } xxxxx} {hosted-agents-https TCP <nil> xxxx {x xxxx } xxxxx}], map[prometheus.io/port:xxxx prometheus.io/scheme:http prometheus.io/scrape:true service.beta.openshift.io/serving-cert-secret-name:svc-xxx-serving-cert])
aws.go:3389] Ignoring private subnet for public ELB "subnet-xxxxxxxxx"
aws.go:3389] Ignoring private subnet for public ELB "subnet-xxxxxxxxx"
aws.go:3389] Ignoring private subnet for public ELB "subnet-xxxxxxxxx"
controller.go:244] error processing service openshift-storage/svc-xxx (will retry): failed to ensure load balancer: could not find any suitable subnets for creating the ELB

Environment

  • Red Hat OpenShift Container Platform (OCP)
    • v4.5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content