# NodePort is not working

**URL:** <https://discuss.kubernetes.io/t/nodeport-is-not-working/20679>\
**Category:** General Discussions\
**Created:** [July 19, 2022, 4:20pm UTC](https://discuss.kubernetes.io/t/nodeport-is-not-working/20679 "2022-07-19T16:20:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phani\_Ch](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/phani_ch/32/10105_2.png) [@Phani\_Ch](https://discuss.kubernetes.io/u/Phani_Ch)\
**Post date:** [July 19, 2022, 4:20pm UTC](https://discuss.kubernetes.io/t/nodeport-is-not-working/20679/1 "2022-07-19T16:20:42Z")

</div>

Asking for help? Comment out what you need so we can get more information to help you!

### Cluster information:

Kubernetes version: 1.22  
Cloud being used: aws  
Installation method: eks  
Host OS: linux  
CNI and version:  
CRI and version: Docker version 20.10.12

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

## apiVersion: apps/v1 kind: ReplicaSet metadata: name: MYAPP labels: app: MYAPP spec: replicas: 3 selector: matchLabels: app: MYAPP template: metadata: labels: app: MYAPP spec: containers: - name: MYAPP image: jenkins ports: - name: web containerPort: 8080

apiVersion: v1  
kind: Service  
metadata:  
name: myapp  
spec:  
type: NodePort  
selector:  
app: myapp  
ports:

- port: 80  
targetPort: 8080

Hi  
NodePort service is not working in workloads like replicaset,deployment  
even the pods are running and the service(NodePort) is connected  
if I use LoadBalancer then I am able to browse the application which is running

but if I deploy only pod in k8s yaml manifests it’s working using NodePort

---

<div class="post-metadata">

**Author:** ![thockin](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/thockin/32/2457_2.png) [@thockin](https://discuss.kubernetes.io/u/thockin)\
**Post date:** [July 19, 2022, 6:07pm UTC](https://discuss.kubernetes.io/t/nodeport-is-not-working/20679/2 "2022-07-19T18:07:20Z")

</div>

[https://kubernetes.io/docs/tasks/debug/debug-application/debug-service/](https://kubernetes.io/docs/tasks/debug/debug-application/debug-service/)
