kubectl expose replicasets.apps existing-rc –port=9000 –target-port=9000 –type=NodePort –name=testport

kubectl patch svc existing-service -p ‘{“spec”: {“type”: “NodePort”}}

Note, if you already have cluster IP, you can also use LoadBalancer.

minikube service –url the-new-service

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store