cannot access the service deployed on a kubernetes cluster on the browser
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.
hiberstackers Answered question February 24, 2021
Most probably the port is not accessible. You need to create a firewall rule to allow the port in GCP. Follow the below steps,
- In GCP, view your instance
- right-click on the icon near ssh and choose “View network details”.
- Click on “Create Firewall Rule”.
Configure the firewall rule like mentioned below,
- Name: all traffic
- Targets: All instances in the network
- Source filter: IP ranges
- Source IP ranges: 0.0.0.0/0
- Second source filter: None
- Protocols and ports: Allow all
- 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.
hiberstackers Answered question February 24, 2021