Welcome to the Linux Foundation Forum!

Kubernetes Fundamentals (LFS258) Exercise 3.5: Access from Outside the Cluster

Per lab instructions

kubectl expose deployment nginx-deployment --type=LoadBalancer is supposed to set up a Load Balancer

But I get

  1. kubectl get svc
  2. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
  3. kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 23h
  4. nginx-deployment LoadBalancer 10.107.206.30 <pending> 80:31340/TCP 16m

as you can see its stuck in pending.

I had a feeling it was a IAM role thing. So I contacted support and they sent me https://cloud.google.com/load-balancing/docs/access-control#roles-and-permissions

Those roles have to be added to the compute instance service account in GCP.
Compute Load Balancer Admin role (roles/compute.loadBalancerAdmin)
Compute Network Admin role (roles/compute.networkAdmin)
Compute Security Admin role (roles/compute.securityAdmin)
Compute Instance Admin role (roles/compute.instanceAdmin)

So I added those to *******23-compute@developer.gserviceaccount.com

And still nothing.

I know in GKE this 100% works every time.

For clarity, I can curl the Ip from the previous step and see the HTML for the default nginx splash page.

Any idea what's going on?

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 2,451

    Hi @DRpandaMD,

    Since we are not using GKE, this feature is not expected to work in the lab exercises. One of the steps also mentions that the external IP will remain in pending after the service has been created.

    Regards,
    -Chris

  • Ok cool just making sure I wasn't being crazy.

    For some of these Labs would it make sense to spin up a GKE cluster and walk through them like that?

    Just for the experience of doing self-managed and CSP-Managed Kubernetes?

  • Posts: 2,451

    The more you practice and the more you change up the environment the more you are going to learn. However, expect slightly different behaviors and outputs when running the same exercises on GKE. Some exercises may not work on GKE as presented in the lab book, so you may need to skip them, or find ways around them :wink:

    Regards,
    -Chris

  • Excellent thank you so much :smile:

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training