<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ramatech Innovations</title>
    <description>The latest articles on DEV Community by Ramatech Innovations (@ramatechofficial).</description>
    <link>https://dev.to/ramatechofficial</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4204599%2F103bf4cd-365e-466f-b344-535f978a4a6f.png</url>
      <title>DEV Community: Ramatech Innovations</title>
      <link>https://dev.to/ramatechofficial</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ramatechofficial"/>
    <language>en</language>
    <item>
      <title>OpenShift Pod Running, but the Application Is Unreachable? Check the Service Port</title>
      <dc:creator>Ramatech Innovations</dc:creator>
      <pubDate>Sat, 24 Oct 2026 12:11:28 +0000</pubDate>
      <link>https://dev.to/ramatechofficial/openshift-pod-running-but-the-application-is-unreachable-check-the-service-port-477k</link>
      <guid>https://dev.to/ramatechofficial/openshift-pod-running-but-the-application-is-unreachable-check-the-service-port-477k</guid>
      <description>&lt;p&gt;A Pod showing &lt;code&gt;Running&lt;/code&gt; does not prove that users can reach its application. One possible cause is a mismatch between the application's listening port and the Service's &lt;code&gt;targetPort&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The example
&lt;/h2&gt;

&lt;p&gt;Assume the application listens on TCP port 8080 and the Service exposes port 80. The Service incorrectly forwards traffic to port 80 on the selected Pods.&lt;/p&gt;

&lt;p&gt;This is one possible diagnosis, not a conclusion to apply to every connectivity failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Inspect before changing anything
&lt;/h2&gt;

&lt;p&gt;Replace the example namespace and resource names with your own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oc get pods &lt;span class="nt"&gt;-n&lt;/span&gt; demo &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;web &lt;span class="nt"&gt;-o&lt;/span&gt; wide
oc get service web &lt;span class="nt"&gt;-n&lt;/span&gt; demo &lt;span class="nt"&gt;-o&lt;/span&gt; yaml
oc get deployment web &lt;span class="nt"&gt;-n&lt;/span&gt; demo &lt;span class="nt"&gt;-o&lt;/span&gt; yaml
oc get endpointslices &lt;span class="nt"&gt;-n&lt;/span&gt; demo &lt;span class="nt"&gt;-l&lt;/span&gt; kubernetes.io/service-name&lt;span class="o"&gt;=&lt;/span&gt;web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confirm that the Service selector matches the intended Pods and inspect endpoint readiness. Check the application's actual listening port using its configuration and logs. Declaring a containerPort does not, by itself, make an application listen on that port.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Recognize the mismatch
&lt;/h2&gt;

&lt;p&gt;The incorrect part of the Service could look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
    &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
    &lt;span class="na"&gt;targetPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, port is the Service port; targetPort is the destination port on the selected Pods. They do not have to be identical.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Correct the source configuration
&lt;/h2&gt;

&lt;p&gt;If the application actually listens on 8080, the corresponding Service configuration should be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
    &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
    &lt;span class="na"&gt;targetPort&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8080&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These YAML blocks are fragments, not complete Service manifests. Preserve the selector and other fields. Update the manifest in your source repository and deploy through your normal change process. Where a controller manages the Service, change its source configuration rather than relying on a manual edit that may be reverted.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Verify from inside the cluster
&lt;/h2&gt;

&lt;p&gt;From an existing diagnostic Pod with curl installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oc &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; demo &amp;lt;diagnostic-pod&amp;gt; &lt;span class="nt"&gt;--&lt;/span&gt; curl &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nt"&gt;--connect-timeout&lt;/span&gt; 5 http://web:80/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The example assumes that the diagnostic Pod is in the same namespace as the Service. Use a path with a known expected application response. An HTTP error response and a connection timeout are different outcomes; interpret the result rather than treating every non-200 response as a networking failure.&lt;/p&gt;

&lt;p&gt;If the request still fails, investigate the application bind address, Pod readiness, Service selectors and NetworkPolicies. For external access, separately inspect the OpenShift Route, its selected Service port and any TLS configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Check each connection separately: application listener, Pod readiness, Service selection, port mapping and external routing. Avoid changing multiple layers at once without evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/tasks/debug/debug-application/debug-service/" rel="noopener noreferrer"&gt;Kubernetes: Debug Services&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>openshift</category>
    </item>
  </channel>
</rss>
