Kubernetes 错误:来自守护程序的错误响应:无效的卷规范-Windows 8.1 Docker Toolbox

Kubernetes 错误:来自守护程序的错误响应:无效的卷规范-Windows 8.1 Docker Toolbox,kubernetes,kubernetes-helm,Kubernetes,Kubernetes Helm,错误:来自守护程序的错误响应:无效的卷规范:“C:/Users/Anthony/magento2 devbox:/C:/Users/Anthony/magento2 devbox” 我用谷歌搜索过这条路,但我看不出这条路是如何组合起来的。大多数路径都不包括:并且我也不确定它为什么会组合此:/C:/n或者这是否只是为错误消息生成的 这是副本集的YAML { "kind": "ReplicaSet", "apiVersion": "extensions/v1beta1", "metada

错误:来自守护程序的错误响应:无效的卷规范:“C:/Users/Anthony/magento2 devbox:/C:/Users/Anthony/magento2 devbox”

我用谷歌搜索过这条路,但我看不出这条路是如何组合起来的。大多数路径都不包括:并且我也不确定它为什么会组合此:/C:/n或者这是否只是为错误消息生成的

这是副本集的YAML

{
  "kind": "ReplicaSet",
  "apiVersion": "extensions/v1beta1",
  "metadata": {
    "name": "magento2-monolith-54cdd5b4b7",
    "namespace": "default",
    "selfLink": "/apis/extensions/v1beta1/namespaces/default/replicasets/magento2-monolith-54cdd5b4b7",
    "uid": "e819bfbd-8820-11e9-a613-080027316036",
    "resourceVersion": "22855",
    "generation": 1,
    "creationTimestamp": "2019-06-06T06:04:12Z",
    "labels": {
      "app.kubernetes.io/instance": "magento2",
      "app.kubernetes.io/name": "monolith",
      "pod-template-hash": "54cdd5b4b7"
    },
    "annotations": {
      "deployment.kubernetes.io/desired-replicas": "1",
      "deployment.kubernetes.io/max-replicas": "1",
      "deployment.kubernetes.io/revision": "1"
    },
    "ownerReferences": [
      {
        "apiVersion": "apps/v1",
        "kind": "Deployment",
        "name": "magento2-monolith",
        "uid": "9ec9d23e-8691-11e9-a3dd-080027316036",
        "controller": true,
        "blockOwnerDeletion": true
      }
    ]
  },
  "spec": {
    "replicas": 1,
    "selector": {
      "matchLabels": {
        "app.kubernetes.io/instance": "magento2",
        "app.kubernetes.io/name": "monolith",
        "pod-template-hash": "54cdd5b4b7"
      }
    },
    "template": {
      "metadata": {
        "creationTimestamp": null,
        "labels": {
          "app.kubernetes.io/instance": "magento2",
          "app.kubernetes.io/name": "monolith",
          "pod-template-hash": "54cdd5b4b7"
        }
      },
      "spec": {
        "volumes": [
          {
            "name": "nginx-config-volume",
            "configMap": {
              "name": "magento2-monolith-nginx-config",
              "defaultMode": 420
            }
          },
          {
            "name": "varnish-config-volume",
            "configMap": {
              "name": "magento2-monolith-varnish-config",
              "defaultMode": 420
            }
          },
          {
            "name": "code",
            "hostPath": {
              "path": "C:/Users/Anthony/magento2-devbox",
              "type": ""
            }
          }
        ],
        "containers": [
          {
            "name": "monolith",
            "image": "magento2-monolith:dev",
            "ports": [
              {
                "containerPort": 8050,
                "protocol": "TCP"
              }
            ],
            "env": [
              {
                "name": "DEVBOX_ROOT",
                "value": "C:/Users/Anthony/magento2-devbox"
              },
              {
                "name": "COMPOSER_HOME",
                "value": "C:/Users/Anthony/magento2-devbox/.composer"
              },
              {
                "name": "MAGENTO_ROOT",
                "value": "C:/Users/Anthony/magento2-devbox/magento"
              },
              {
                "name": "MAGENTO_ROOT_HOST",
                "value": "C:/Users/Anthony/magento2-devbox/magento"
              },
              {
                "name": "DEVBOX_ROOT_HOST",
                "value": "C:/Users/Anthony/magento2-devbox"
              },
              {
                "name": "IS_WINDOWS_HOST",
                "value": "0"
              }
            ],
            "resources": {},
            "volumeMounts": [
              {
                "name": "code",
                "mountPath": "C:/Users/Anthony/magento2-devbox"
              }
            ],
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "Never",
            "securityContext": {
              "privileged": true,
              "procMount": "Default"
            }
          },
          {
            "name": "monolith-xdebug",
            "image": "magento2-monolith:dev-xdebug",
            "ports": [
              {
                "containerPort": 8002,
                "protocol": "TCP"
              }
            ],
            "env": [
              {
                "name": "DEVBOX_ROOT",
                "value": "C:/Users/Anthony/magento2-devbox"
              },
              {
                "name": "COMPOSER_HOME",
                "value": "C:/Users/Anthony/magento2-devbox/.composer"
              },
              {
                "name": "MAGENTO_ROOT",
                "value": "C:/Users/Anthony/magento2-devbox/magento"
              },
              {
                "name": "MAGENTO_ROOT_HOST",
                "value": "C:/Users/Anthony/magento2-devbox/magento"
              },
              {
                "name": "DEVBOX_ROOT_HOST",
                "value": "C:/Users/Anthony/magento2-devbox"
              },
              {
                "name": "IS_WINDOWS_HOST",
                "value": "0"
              }
            ],
            "resources": {},
            "volumeMounts": [
              {
                "name": "code",
                "mountPath": "C:/Users/Anthony/magento2-devbox"
              }
            ],
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "Never",
            "securityContext": {
              "privileged": true,
              "procMount": "Default"
            }
          },
          {
            "name": "nginx",
            "image": "nginx:1.9",
            "resources": {},
            "volumeMounts": [
              {
                "name": "code",
                "mountPath": "C:/Users/Anthony/magento2-devbox"
              },
              {
                "name": "nginx-config-volume",
                "mountPath": "/etc/nginx/nginx.conf",
                "subPath": "nginx.conf"
              }
            ],
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "IfNotPresent",
            "securityContext": {
              "privileged": true,
              "procMount": "Default"
            }
          },
          {
            "name": "varnish",
            "image": "million12/varnish",
            "env": [
              {
                "name": "VCL_CONFIG",
                "value": "/etc/varnish/magento.vcl"
              },
              {
                "name": "VARNISHD_PARAMS",
                "value": "-a 0.0.0.0:6081"
              }
            ],
            "resources": {},
            "volumeMounts": [
              {
                "name": "varnish-config-volume",
                "mountPath": "/etc/varnish/magento.vcl",
                "subPath": "varnish.vcl"
              }
            ],
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "Always"
          }
        ],
        "restartPolicy": "Always",
        "terminationGracePeriodSeconds": 30,
        "dnsPolicy": "ClusterFirst",
        "securityContext": {},
        "schedulerName": "default-scheduler"
      }
    }
  },
  "status": {
    "replicas": 1,
    "fullyLabeledReplicas": 1,
    "observedGeneration": 1
  }
}

我刚从流浪者那里来到Docker/Kubernetes,所以我不知道从哪里开始。我从web浏览器仪表板中获得的信息可能未转换为unix样式。自docker 1.9.0以来,Windows路径不会自动转换(例如C:\Users到/C/Users)

因此,您的路径应该如下所示:

{
   "name": "DEVBOX_ROOT",
   "value": "/c/Users/Anthony/magento2-devbox"
}

路径可能未转换为unix样式。自docker 1.9.0以来,Windows路径不会自动转换(例如C:\Users到/C/Users)

因此,您的路径应该如下所示:

{
   "name": "DEVBOX_ROOT",
   "value": "/c/Users/Anthony/magento2-devbox"
}

好的,谢谢。你知道应该在哪里修改吗?是否有配置YAML somwhete,或者您是否可以编辑它并将其直接保存到浏览器控件中panel@Anthony您可以在ReplicaSet yamlOk中修改它,谢谢。你知道应该在哪里修改吗?是否有配置YAML somwhete,或者您是否可以编辑它并将其直接保存到浏览器控件中panel@Anthony您可以在复制集yaml中修改它