apiVersion: v1
kind: Service
metadata:
  name: account-docking-headless 
  labels:
    app: account-docking
spec:
  ports:
  - port: 80
    protocol: TCP
    name: http
  selector:
    app: account-docking
  clusterIP: None
---
apiVersion: v1
kind: Service
metadata:
  name: account-docking-nodeport
spec:
  type: NodePort
  selector:
    app: account-docking
  ports:
  - port: 80
    targetPort: 80
    nodePort: 30010
    
---
apiVersion: v1
kind: Service
metadata:
  name: account-docking
  labels:
    app: account-docking
spec:
  ports:
  - port: 80 对外暴露端口
    protocol: TCP
    name: http
  selector:
    app: account-docking
apiVersion: apps/v1
kind: Deployment
metadata:
  name: account-docking
spec:
  replicas: 1
  selector:
    matchLabels:
      app: account-docking
  template:
    metadata:
      labels:
        app: account-docking
    spec:
      containers:
      - name: account-docking
        image: 业余镜像nginx:1.27.0
        ports:
        - containerPort: 80业务端口