pvc

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: kodexplorer-data
  namespace: test
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: "nfs"
  resources:
    requests:
      storage: 1500Gi


dp

apiVersion: apps/v1
kind: Deployment
metadata:
  name: kodexplorer-server
  namespace: test
  labels:
    app: kodexplorer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kodexplorer
      tier: nginx-php
  template:
    metadata:
      labels:
        app: kodexplorer
        tier: nginx-php
    spec:
      containers:
      - image: registry.cn-hangzhou.aliyuncs.com/sre_pub/nginx-php-fpm
        #richarvey/nginx-php-fpm
        name: kodexplorer-server
        ports:
        - containerPort: 9000
        - containerPort: 80
          name: nginx-php
        volumeMounts:
        - name: web-data
          mountPath: /var/www/html/
      volumes:
      - name: web-data
        persistentVolumeClaim:
          claimName: kodexplorer-data

svc

apiVersion: v1
kind: Service
metadata:
  labels:
    app: kodexplorer
  name: kodexplorer-server
  namespace: test
spec:
  ports:
  - name: kodexplorer
    port: 80
    protocol: TCP
    targetPort: 80
    nodePort: 30055
  selector:
    app: kodexplorer
  type: NodePort

php文件丢PVC里面

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code