apiVersion: v1
kind: Service
metadata:
  labels:
    kubernetes.io/name: endpoint
  name: endpoint
  namespace: kube-system
spec:
  ports:
  - protocol: TCP
    port: 31000
    nodePort: 31000
  selector:
    app: nginx
  type: NodePort 