kelseyhightower / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way. No scripts.
Apache License 2.0
41.26k stars 14.12k forks source link

Step 13 Create a firewall rule that allows remote access to the nginx node port #673

Open Kasper886 opened 3 years ago

Kasper886 commented 3 years ago

ERROR: (gcloud.compute.firewall-rules.create) Firewall rules must be of the form PROTOCOL[:PORT[-PORT]]; received [tcp:].

Kasper886 commented 3 years ago

gcloud compute firewall-rules create kubernetes-the-hard-way-allow-nginx-service \ --allow=tcp:${NODE_PORT} \ --network kubernetes-the-hard-way

I changed ${NODE_PORT} to the port that I received from the command "kubectl get svc" (31727), but I still cannot run curl command. I also tried to use 80 port for firewall creation command. curl -I http://${EXTERNAL_IP}:${NODE_PORT} - connection refused.

Kasper886 commented 3 years ago

But it works from my browser from remote PC)))