fileserver.yaml 584 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
apiVersion: v1
kind: Pod
metadata:
  name: file-server
  labels:
    app: file-server
spec:
  volumes:
  - hostPath:
      path: /home/work
      type: ""
    name: file-home
  containers:
  - name: file-server
    image: halverneus/static-file-server
    ports:
    - containerPort: 8080
    volumeMounts:
    - mountPath: /web
      name: file-home
  nodeSelector:
    nodeType: model
---
kind: Service
apiVersion: v1
metadata:
  name: loadbalancer
spec:
  type: LoadBalancer
  ports:
    - name: file-server
      port: 8080
      targetPort: 8080
  selector:
    app: file-server