But reading the documentation, when a client connects to the sentinel, sentinel gives client the master redis server.
Not quite, it will give you what you request from it. If you ask for the master, you get the master. If you ask for the slaves, it will return the list of slaves. You use sentinel master <name>
to get the master, and sentinel slaves <name>
for the list of slaves.
Thus if you want to do read-only operations on slaves, use a sentinel connection to get the slave list, then open a connection to one or more of those slaves. The tricky part will be that you will want your code to watch for and detect failovers so you know if your slave has been promoted and you can get the new slave list to use.
sidenote: don't think of it as "connecting to redis via sentinel". The would be as inaccurate as saying you "connect to a web server via DNS server" - sentinel is your lookup service, not a proxy connection.