Noob Question on kubectl expose deployment nginx --type=LoadBalancer

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: kubeadm=1.18.1-00 kubelet=1.18.1-00 kubectl=1.18.1-00
Cloud being used: GCP
Installation method: Manual (The hard way)
Host OS: Ubuntu 18 LTS
CNI and version: ??
CRI and version: ??

Learning Kubernetes for career growth and hopefully a CKA exam soon and my first post on here.

I cant seem to figure out why kubectl expose deployment nginx --type=LoadBalancer

Will just hang with nginx LoadBalancer 10.98.222.158 <pending> 80:31825/TCP 22m

I’ve contacted the Google Help Chat and attached

Compute Instance Admin (beta)

Compute Load Balancer Admin

Compute Network Admin

Compute Security Admin

ROLES TO -> Compute Engine default service account

Its like the call to make that LoadBalancer is never leaving GCE.

Not sure what to do here.

I’ve already nuked the cluster and built a whole new one and encountered the same issue.

Did you configure it for gce? kubeadm isn’t aware out of the box of which cloud provider your using and it requires a little bit of additional configuration if you’re going to use things that need to interact with an external entity - namely, loadbalancers and storage.


1 Like