k8s安装,提示不能创建临时目录,实际上目录有权限
有朋友遇到这个问题吗?指导一下
不把目录挂载出来就没问题,挂载出来就出现这个问题。
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: zentao-pvc
namespace: infrastructure
spec:
accessModes:
- ReadWriteOnce
storageClassName: ebs-sc
resources:
requests:
storage: 5Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: infrastructure
name: zentao
labels:
app: zentao
spec:
replicas: 1
selector:
matchLabels:
app: zentao
template:
metadata:
labels:
app: zentao
spec:
securityContext:
fsGroup: 200
containers:
- name: zentao
image: easysoft/zentao:16.0
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
ports:
- name: zentao
containerPort: 80
resources:
limits:
cpu: 4000m
memory: 2Gi
requests:
cpu: 500m
memory: 512Mi
volumeMounts:
- name: zentao-data
mountPath: /www/zentaopms
volumes:
- name: zentao-data
persistentVolumeClaim:
claimName: zentao-pvc