apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: mango
  name: mango
  namespace: pcdn
spec:
  replicas: 1
  selector:
    matchLabels:
      name: mango
  template:
    metadata:
      creationTimestamp: null
      labels:
        name: mango
    spec:
      containers:
        - image: dezhao/mango
          imagePullPolicy: IfNotPresent
          name: mango
          ports:
            - containerPort: 9000
              name: http
              protocol: TCP
          volumeMounts:
            - mountPath: /root/mango/library
              name: library
      volumes:
        - name: library
          persistentVolumeClaim:
            claimName: mango-data

---
apiVersion: v1
kind: Service
metadata:
  labels:
    name: mango
  name: mango
  namespace: pcdn
spec:
  ports:
    - name: http
      nodePort: 30068
      port: 9000
      protocol: TCP
      targetPort: 9000
  selector:
    name: mango
  sessionAffinity: None
  type: NodePort


发表回复

您的电子邮箱地址不会被公开。

Captcha Code