How to check ports and connections with netstat or ss inside a container running in openshift 4?

Solution Verified - Updated -

Issue

  • Need to check active connections to a container running on OpenShift 4
  • How many connections are ACTIVE or in TIME_WAIT in a pod.
  • Measuring active port usage on application containers.
  • How can I use dig or nslookup in a pod that does not include these binaries?

Environment

  • Red Hat OpenShift Container Platform (OCP) 4
  • All platforms

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content