apiVersion: v1

kind: Service

metadata:
  name: nginx-svc-none

spec:
  # 这里选择器要关联到哪些Pod资源
  selector:
    app: nginx
    tier: frontend
  clusterIP: None
  ports: 
  - name: nginx-ports
    port: 80
    targetPort: 80
