DEV Community

Discussion on: Getting Started: Create and Manage Cloud Resources: Challenge Lab

Collapse
 
hot9cups profile image
Ayush Modi • Edited

Would you mind explaining, in task 3 step 5, why do we need to add the following code?

gcloud compute instance-groups managed \ 
set-named-ports nginx-group \
--named-ports http:80
Enter fullscreen mode Exit fullscreen mode

Didn't they ask us to just create the health check?
I really think I'm missing some theory and it'd be great if someone could explain

Collapse
 
resonates7 profile image
resonates7

Hi Ayush, that bit is required in the instructions, although it isn't associated with a the health check. The instructions indicate 'Create a backend service, and attach the managed instance group with named port (http:80).'

Named ports are used by load balancers. Check out this documentation for more info:

cloud.google.com/sdk/gcloud/refere...