Bootstrap FreeKB - OpenShift - List endpoints using the oc get endpoints command
OpenShift - List endpoints using the oc get endpoints command

Updated:   |  OpenShift articles

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

The oc get endpoints command can be used to list the endpoints in the currently selected project / namespace.

TIP

The -A or --all-namespaces flag can be used to list the endpoints in every project / namespace.

The -n or --namespace flag can be used to list the endpoints in a certain project / namespace.

~]$ oc get endpoints --namespace my_project
NAME                       ENDPOINTS            AGE
my-app                     10.131.5.3:8080      540d

 

Typically, the endpoints are obtained from the Services in the currently selected project / namespace.The oc describe service command can be used to show the details of the services in the currently selected project / namespace. Notice in this example that the Service listens for connections on port 12345 and forwards requests on the pod labeled app=my-app and the app in the pod is expected to listen for requests on port 8080.

~]$ oc describe service my_service --namespace my_project
Name:              my_service
Namespace:         default
Labels:            <none>
Annotations:       <none>
Selector:          app=my-app
Type:              ClusterIP
IP:                172.30.166.121
Port:              http  12345/TCP
TargetPort:        8080/TCP
Endpoints:         10.131.5.3:8080
Session Affinity:  None
Events:            <none>

 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 9ac051 in the box below so that we can be sure you are a human.