I have a simple cluster working nicely, as per tutorial.
One question — When I look at the services I see:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
employees-ha ClusterIP 111.222.111.222 <none> 5432/TCP 12m
employees-ha-config ClusterIP None <none> <none> 12m
employees-pods ClusterIP None <none> <none> 12m
employees-primary ClusterIP None <none> 5432/TCP 12m
employees-replicas ClusterIP 111.222.111.222 <none> 5432/TCP 12m
(Ip addresses modified)
And pods:
NAME READY STATUS RESTARTS AGE
employees-backup-l4sj--1-c9xzm 0/1 Completed 0 30m
employees-instance1-7jsq-0 3/3 Running 0 31m
employees-instance1-942s-0 3/3 Running 0 31m
employees-instance1-m842-0 3/3 Running 0 31m
employees-repo-host-0 1/1 Running 0 31m
I was slightly unsure which pods or service to expose, and tried
✗ kubectl expose service/employees-primary --type=LoadBalancer --port=5432 --target-port=5432 --name employees
error: couldn't retrieve selectors via --selector flag or introspection: the service has no pod selector set
See 'kubectl expose -h' for help and examples
So at this point I probably need to check the pod annotations and figure out how to define my service, but I would have expected this to have been done in one of these services already.
I’m running OpenShift on IBMCloud.
Any tips?
Thanks
Nigel Jones