#
# Create a service as - 
# kubectl apply -f nginx-service.yml
# In minikube, to access this external service use - 
# minikube service nginx-service
#
apiVersion: v1
kind: Service
metadata:
  name: nginx-service
spec:
  selector:
    app: nginx
  type: LoadBalancer # creates an external service
  ports:
    - protocol: TCP
      port: 8080
      targetPort: 8080
      nodePort: 30001 # external service port number (range 30000 - 32767)
