apiVersion: v1
kind: Service
metadata:
  name: demo02-service
  labels:
    app: demo02-service
spec:
  selector:
    app: demo02
  type: NodePort  #用主机IP:32000访问
  ports:
    - name: default
      nodePort: 32000 #用主机IP:32000访问
      protocol: TCP
      port: 81
      targetPort: 81