kubectl get services --field-selector type=NodePort
. This will help identify the specific service that is receiving the unexpected connection.kubectl get services
command to list all services in the cluster.kubectl get service <service-name> -o yaml
command to get the current service manifest.service.yaml
.service.yaml
in a text editor.spec.type
field in the manifest file.
spec.type
from NodePort
to ClusterIP
.service.yaml
.kubectl apply -f service.yaml
command to apply the changes.kubectl get services
again.