Jared,

Openshift exposes the ExternalIP and you have to associate it with a NIC to use it. We usually do this by making it a VIP in a high availability configuration. You also need to route to the node.


Something like:
ip addr add 10.252.0.28/24 dev em2
on one of the nodes in the cluster should work.

The following my help as well:
https://docs.openshift.com/container-platform/3.6/admin_guide/tcp_ingress_external_ports.html

phil


On 08/10/2017 04:12 AM, Yu Wei wrote:

Hi guys,

I deployed redis with replication controller successfully on openshift origin cluster.

Then I tried to create service for external clients to connect.

However, it seemed that it didn't work.

How could I debug similar problem? Is there any guidance about using externalIP in openshift?


The detailed information is as below,

/[root@host-10-1-236-92 gluster]# oc get svc
NAME CLUSTER-IP     EXTERNAL-IP PORT(S)              AGE
glusterfs-cluster 172.30.6.143   <none> 1/TCP                1d
redis-svc 172.30.51.20 10.1.236.92,10.1.236.93,10.1.241.55 26379/TCP,6379/TCP 24m
[root@host-10-1-236-92 gluster]# oc describe svc redis-svc
Name:  redis-svc
Namespace:  openshiift-servicebroker
Labels:  <none>
Selector:  sb-2017-redis-master=master
Type:  ClusterIP
IP:  172.30.51.20
Port:  redis-sen    26379/TCP
Endpoints:  172.30.41.5:26379
Port:  redis-master    6379/TCP
Endpoints:  172.30.41.5:6379
Session Affinity:  None
No events./
/[root@host-10-1-236-92 gluster]# cat redis-master-svc.yaml
---
kind: Service
apiVersion: v1
metadata:
  name: redis-svc
spec:
    selector:
sb-2017-redis-master: master
    ports:
      - name: redis-sen
        protocol: TCP
        port: 26379
        targetPort: 26379
      - name: redis-master
        protocol: TCP
        port: 6379
        targetPort: 6379
    externalIPs:
      -  10.1.236.92
      -  10.1.236.93
      -  10.1.241.55/


Thanks,

Jared, (韦煜)
Software developer
Interested in open source software, big data, Linux



_______________________________________________
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


_______________________________________________
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to