I am trying to learn docker and kubernetes and one of the things I am trying to do is setup Redis with Sentinel and expose redis to things outside the container.
Getting redis and sentinel setup was pretty easy following https://github.com/kubernetes/kubernetes/tree/master/examples/storage/redis
But now my next desire is to be able to access redis outside the container and I can't figure out who to expose sentinel and the master pod.
The redis sentinel service file from your link (https://github.com/kubernetes/kubernetes/blob/master/examples/storage/redis/redis-sentinel-service.yaml) will expose the pods within the cluster. For external access (from outside your cluster) you can use a NodePort:
This would expose the port 30369 on all your hosts from the outside world to the redis sentinel service.
Several remarks on this: * Firewall: Security in redis is limited, so prevent unwanted access before opening the port * The allowed to be assigned nodePort range is from 30000 to 32767, so be creative with this limitation.