apiVersion: v1
kind: Namespace
metadata:
  name: cwx
---
# 这是一个普通的服务, 没有使用 ingress 或 metalLB
apiVersion: v1
kind: Service
metadata:
  name: mygoweb
  namespace: cwx
spec:
  selector:
    app: goweb
  type: NodePort
  ports:
  - port: 10001
    targetPort: 19002
    nodePort: 30002
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: goweb
  namespace: cwx
spec:
  replicas: 2
  selector:
    matchLabels:
      app: goweb
  template:
    metadata:
      labels:
        app: goweb
    spec:
      containers:
      - name: goweb
        image: registry.wait/cwx/base-web:0.0.9
        # volumeMounts:
        # - mountPath: /data
        #   name: nfs-volume   # 挂载 nfs 卷
      # volumes:
      # - name: nfs-volume
      #   nfs:
      #     server: wcn7
      #     path: /data/public_nfs/web1
