What the following command does?
kubectl expose rs some-replicaset --name=replicaset-svc --target-port=2017 --type=NodePort
Answer
It exposes a ReplicaSet by creating a service called 'replicaset-svc'. The exposed port is 2017 (this is the port used by the application) and the service type is NodePort which means it will be reachable externally.