<p>I have made a nginx deployment which will be tagged by a ClusterIP service via a selector. Then I entered a new pod that is not related to that deployment nor service. And from within that pod I try to ping the i.p of the ClusterIP service hoping it would reach the nginx deploy, but it's not receiving the ping response.</p>
<p>The nginx deployment I made was with this manifest.</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
spec:
  selector:
    matchLabels:
      run: my-nginx
  replicas: 1
  template:
    metadata:
      labels:
        run: my-nginx
    spec:
      containers:
      - name: my-nginx
        image: nginx
        ports:
        - containerPort: 80
</code></pre>
<p>Then, the service I created was with this manifest:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: basicping-service
  labels:
    run: my-nginx
spec:
  ports:
  - port: 80
    protocol: TCP
  selector:
    run: my-nginx
</code></pre>
<p>I made sure the service got created by running <code>kubectl get svc</code> and it did, the i.p is <code>10.98.91.185</code></p>
<p>And then I created a new pod completely unrelated to this deployment&amp;Service.</p>
<p><code>kubectl run -it --rm --image=ubuntu  bash</code></p>
<p>From within it, I pinged a sandbox server called <code>pingtest.net</code> just to see it was able to send requests and receive response. And it did</p>
<p>So finally, I tried pinging the <code>basicping-service</code> created previously by trying to ping the i.p of the service, I did this by running <code>ping 10.98.91.185</code></p>
<p>And here is the problem. It does sends pings but doesn't receives the responses back, even after several minutes.</p>
<p>It was my understanding that the ping should have received a response. But is my understanding of services incorrect ? Or it should have worked but there is an error?</p>
<p>Just for more documentation, the my-nginx deployment is running, and the pod as well. And there seems to be nothing wrong with the nginx running in it. I checked this by running the <code>kubectl describe</code> of the deploy &amp; pod, and also by checking the pod's logs, it's running nginx correctly apparently. Also, after running <code>kubectl describe svc basicping-service</code> it does shows the nginx pod's i.p address with port 80 as the endpoint</p>

Eugenio.Gastelum96
<p>ping doesn't work with a service's cluster IP, as it is a virtual IP.
You should be able to ping a specific pod, but not a service.</p>
<p>ping sends packets using the very-low-level ICMP protocol, but Nginx serves HTTP which uses the TCP protocol instead.</p>
