Chapter 4. Red Hat OpenShift components and architecture 67
The default service clusterIP addresses are from the OpenShift Container Platform internal 
network and they are used to permit Pods to access each other.
To permit external access to the service, more externalIP and ingressIP addresses that are 
external to the cluster can be assigned to the service. These externalIP addresses also can 
be virtual IP addresses that provide highly available access to the service.
Services are assigned an IP address and port pair that, when accessed, proxy the 
connections to an appropriate backing pod. A service uses a label selector to find all the 
containers that are running that provide a specific network service on a specific port, as 
shown in Example 4-1.
Example 4-1   OpenShift service description
# oc   describe service httpd-example02
Name:              httpd-example02
Namespace:         project-test-ff
Labels:            app=httpd-example
template=httpd-example
Annotations:       description=Exposes and load balances the application pods
Selector:          name=httpd-example02
Type:              ClusterIP
IP:                172.30.92.1
Port:              web  8080/TCP
TargetPort:        8080/TCP
Endpoints:         10.1.6.4:8080
Session Affinity:  None
Events:            <none>
Configuring a NodePort
NodePort is used to make available the service on a static port on all nodes in the cluster, as 
shown in Example 4-2.
Example 4-2   Service YAML sample file for nodePort configuration
apiVersion: v1
kind: Service
metadata:
  annotations:
    description: Exposes and load balances the application pods
  creationTimestamp: '2019-10-09T16:04:11Z'
  labels:
    app: httpd-example
    template: httpd-example
  name: httpd-test03
  namespace: project-test
  resourceVersion: '72908925'
  selfLink: /api/v1/namespaces/project-test/services/httpd-test03
  uid: 6ec5640d-eaae-11e9-860f-fafa40b70720
spec:
  clusterIP: 172.30.166.205
  externalTrafficPolicy: Cluster
  ports:
    - name: http
      nodePort: 30080
      port: 8080