Not able to access the nginx web page getting error like 502 Bad Gateway nginx/1.27.4

i have created both service and Deployment and pods are running fine but i need to check how i can access my web page nginx in kudekloud

Please find the yml file details here

controlplane ~ :heavy_multiplication_x: kubectl create -f service.yaml
service/mukund-group created

controlplane ~ ➜ kubectl get pods
NAME READY STATUS RESTARTS AGE
mukund-group-69c7fb47b6-8fqqr 1/1 Running 0 2m40s
mukund-group-69c7fb47b6-gcfql 1/1 Running 0 2m40s
mukund-group-69c7fb47b6-gd6r5 1/1 Running 0 2m40s
mukund-group-69c7fb47b6-p5z4d 1/1 Running 0 2m40s
mukund-group-69c7fb47b6-x5qtv 1/1 Running 0 2m40s

controlplane ~ ➜ cat Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: mukund-group
labels:
app: mukund-group
spec:
replicas: 5
selector:
matchLabels:
app: mukund-group
template:
metadata:
labels:
app: mukund-group
spec:
containers:
- name: mukund-group
image: nginx
ports:
- containerPort: 8080

controlplane ~ ➜ cat service.yaml
apiVersion: v1
kind: Service
metadata:
name: mukund-group
labels:
app: mukund-group
spec:
selector:
app: mukund-group
ports:
- protocol: TCP
port: 80
targetPort: 8080
nodePort: 30080
type: NodePort

even i tried to open the port from the kudekloud but its not happening so is there any mistake i doing here need your suggestions please

View Port

Enter a port number to view the service running on it in a new browser tab.

Hi @kmukund97,

Please share the lab link, I’ll check it.

@raymond.baoly

Please check once and suggest me if am doing any thing wring steps

https://learn.kodekloud.com/user/courses/cka-certification-course-certified-kubernetes-administrator/module/c6d2ac7d-8192-4cff-aa54-e36d888c5bd9/lesson/3d48e7c7-442e-4491-9ec2-aa5e1fffccf2

Hi @kmukund97

"I’ve checked it, and it’s working fine on my end. Could you please let me know the exact issue you’re facing and share a screenshot? That would help.

HI i created service.yaml please check it i am not able to access that nginx web page still so using 30080 port

If you’re not sure what to do, you can check the Solution or Hint tab for help.


see this is the error i am getting when i am trying access nginx web page

Hi @kmukund97,

Please use the simple-webapp-ui button here to verify the app
image