Openshift Container Platform 4: Service(SVC) networking troubleshooting of generic issues of communication.
Issue
A service is an abstraction that presents a unified network interface that is backed by one or more pods. If in OCP the microservices need to talk to each other internally without exposing routes to the outside world, the "service" object is used and needed. These microservices interact via the Kubernetes "service" API, which acts as a load balancer that resolves a set of pods to a single IP.
While OpenShift and the service API work together to abstract most of the complexity behind networking, problems can still arise when trying to interact with other microservices deployed on OpenShift
For the examples, we’ll assume a basic app consisting of a single ClusterIP Service and Deployment, each called hello-world. The following service will be used as an example for each issue described in this post.
apiVersion: v1
kind: Service
metadata:
name: hello-world
namespace: my-namespace
spec:
selector:
app: hello-world
ports:
- name: https
protocol: TCP
port: 443
targetPort: 8443
Environment
- Openshift Container Platform 4.x [RHOCP]
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.