相关疑难解决方法(0)

无法为volumeMount准备子路径

出现此错误。

Error: failed to prepare subPath for volumeMount "solr-collection-config" of container "upload-config-container"

使用 kubernetes 1.10.11

      - name: upload-config-container
        image: solr:7.4.0-alpine
        imagePullPolicy: Always
        resources:
          requests:
            memory: "128Mi"
            cpu: "100m"
          limits:
            memory: "256Mi"
            cpu: "200m"
        volumeMounts:
        - name: solr-collection-config
          mountPath: /tell/carbon/conf
          subPath: conf
Run Code Online (Sandbox Code Playgroud)

solr-collection-config是代表 ConfigMap 的卷

     volumes:
      - name: solr-collection-config
        configMap:
          name: solr-collection-resources
          items:
          - key: stopwords_en.txt
            path: "conf/lang/stopwords_en.txt"
          - key: _rest_managed.json
            path: "conf/_rest_managed.json"
          - key: currency.xml
            path: "conf/currency.xml"
          - key: protwords.txt
            path: "conf/protwords.txt"
          - key: schema.xml
            path: "conf/schema.xml"
          - key: …
Run Code Online (Sandbox Code Playgroud)

kubernetes configmap

3
推荐指数
1
解决办法
9210
查看次数

标签 统计

configmap ×1

kubernetes ×1