守护程序的错误响应:创建安装源路径权限时出错

问题描述 投票:0回答:1

这是我的K8s的postgress配置

apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: postgres
  template:
    metadata:
      labels:
        component: postgres
    spec:
      volumes:
        - name: postgres-storage
          persistentVolumeClaim:
            claimName: database-persistent-volume-claim
      containers:
      - name: postgres
        image: postgres
        ports:
        - containerPort: 5432
        volumeMounts:
          - mountPath: /var/lib/postgresql/data
            name: postgres-storage

以下是事件日志

Events:
  Type     Reason     Age                From                     Message
  ----     ------     ----               ----                     -------
  Normal   Scheduled  35s                default-scheduler        Successfully assigned default/postgres-deployment-d57b94d8-qnk8j to docker-desktop
  Normal   Pulling    11s (x3 over 34s)  kubelet, docker-desktop  Pulling image "postgres"
  Normal   Pulled     6s (x3 over 30s)   kubelet, docker-desktop  Successfully pulled image "postgres"
  Normal   Created    6s (x3 over 29s)   kubelet, docker-desktop  Created container postgres
  Warning  Failed     6s (x3 over 29s)   kubelet, docker-desktop  Error: failed to start container "postgres": Error response from daemon: error while creating mount source path '/host_mnt/c/Users/DupinderDhiman/.docker/Volumes/database-persistent-volume-claim/pvc-c8155b21-10d9-11ea-b05a-00155d380104': mkdir /host_mnt/c/Users/DupinderDhiman/.docker: permission denied

是的,我知道你会说,分享驱动器。我做了docker run --rm -v c:/Users:/data alpine ls /data

All Users
CatalystOne
Default
Default User
DupinderDhiman
Public
desktop.ini

此命令运行得很好

因此问题与驱动器共享无关

好,下一个问题可能与c:/ specificFolder权限有关。我是否勾选了共享权限中的所有复选框

现在我被卡住了

kubernetes kubectl docker-volume kubernetes-pvc
1个回答
0
投票
None
热门问题
推荐问题
最新问题