cannot access the service deployed on a kubernetes cluster on the browser

1.23K viewsKubernetesgcp kubernetes

cannot access the service deployed on a kubernetes cluster on the browser

I deployed service on a kubernetes cluster but is not accessible on the browser

[[email protected] vin]# kubectl get svc svc1
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
svc1 NodePort 10.107.151.4 80:32000/TCP 27m

when I am accessing my slave ipaddress:32000 on the browser it is not working. I have done the setup on GCP.

Share:
hiberstackers Answered question February 24, 2021
0

Most probably the port is not accessible. You need to create a firewall rule to allow the port in GCP. Follow the below steps,

  1. In GCP, view your instance
  2. right-click on the icon near ssh and choose “View network details”.
  3. Click on “Create Firewall Rule”.

Configure the firewall rule like mentioned below,

  1. Name: all traffic
  2. Targets: All instances in the network
  3. Source filter: IP ranges
  4. Source IP ranges: 0.0.0.0/0
  5. Second source filter: None
  6. Protocols and ports: Allow all
  7. Save

Now you should be able to access the application on the browser.

Note: These settings should not be done in a production environment as they will open all the ports.

Share:
hiberstackers Answered question February 24, 2021
0
You are viewing 1 out of 1 answers, click here to view all answers.