Kubernetes with helm on local persistent volume with docker for WindowsMaster not starting when running Kubernetes locally via DockerSystem error: exec: “deployment”: executable file not found in $PATHDeploying to Kubernetes' Local Persistent Storage via HelmGoogle Kubernetes Engine: Not seeing mount persistent volume in the instanceHow to mount a volume with a windows container in kubernetes?Share nfs volume between kubernetes clustersKubernetes helm, Files.Get and variableskubernetes helm chartCommon dependency in Kubernetes Helmequivalent of “minikube ssh” with docker-for-desktop Kubernetes node

What is the source of the fear in the Hallow spell's extra Fear effect?

How to create large inductors (1H) for audio use?

Was "The Hobbit" ever abridged?

Why is a pressure canner needed when canning?

Why are UK MPs allowed to not vote (but it counts as a no)?

How do I delete cookies from a specific site?

Why there are construction cranes on apparently completed buildings in New York?

Where on Earth is it easiest to survive in the wilderness?

How can I hint that my character isn't real?

Are there mathematical concepts that exist in the fourth dimension, but not in the third dimension?

What is the justification for Dirac's large numbers hypothesis?

Never make public members virtual/abstract - really?

What's this constructed number's starter?

In High Performance Liquid Chromatography, why are ratios of solvents used?

Why Is Sojdlg123aljg a Common Password?

Pronunciation of "sincero" and "sinceramente"

Why did Boris Johnson call for new elections?

Why would one hemisphere of a planet be very mountainous while the other is flat?

How can I oppose my advisor granting gift authorship to a collaborator?

In-universe, why does Doc Brown program the time machine to go to 1955?

Would you recommend a keyboard for beginners with or without lights in keys for learning?

Translate English to Pig Latin | PIG_LATIN.PY

Prove that a function is bijective and show that G is a group

Global variables and information security



Kubernetes with helm on local persistent volume with docker for Windows


Master not starting when running Kubernetes locally via DockerSystem error: exec: “deployment”: executable file not found in $PATHDeploying to Kubernetes' Local Persistent Storage via HelmGoogle Kubernetes Engine: Not seeing mount persistent volume in the instanceHow to mount a volume with a windows container in kubernetes?Share nfs volume between kubernetes clustersKubernetes helm, Files.Get and variableskubernetes helm chartCommon dependency in Kubernetes Helmequivalent of “minikube ssh” with docker-for-desktop Kubernetes node






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I tried to use helm on docker for windows on the local machine. When I used a storage class as local storage, persistent volume, and persistent volume claim without helm, it works fine. But when I used this setting with helm, CrashLoopBackOff happened.



localStrageClass.yaml



kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer


pv.yaml



apiVersion: v1
kind: PersistentVolume
metadata:
name: local-pv002
labels:
type: local
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
#storageClassName: hostpath
mountOptions:
- hard
persistentVolumeReclaimPolicy: Delete
storageClassName: local-storage
local:
path: /c/k/share/mysql
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
#- key: docker.io/hostname
- key: kubernetes.io/hostname
operator: In
values:
- docker-desktop


pvc.yaml



apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: local-mysql-claim
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: local-storage


mysqlConf.yaml



persistence:
enabled: true
storageClass: local-storage
existingClaim: local-mysql-claim
accessMode: ReadWriteOnce
size: 1Gi
annotations:


$ helm install --name mysql stable/mysql -f mysqlConf.yaml

$ kubectl describe pod mysql



Containers:
mysql:
Container ID: docker://533e4569603b05fac83a0a701da97898b3190503618796678ac5db6340c4dce6
Image: mysql:5.7.14
Image ID: docker-pullable://mysql@sha256:c8f03238ca1783d25af320877f063a36dbfce0daa56a7b4955e6c6e05ab5c70b
Port: 3306/TCP
Host Port: 0/TCP
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Thu, 28 Mar 2019 13:24:25 +0900
Finished: Thu, 28 Mar 2019 13:24:25 +0900
Ready: False
Restart Count: 2
Requests:
cpu: 100m
memory: 256Mi
Liveness: exec [sh -c mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD] delay=30s timeout=5s period=10s #success=1 #failure=3
Readiness: exec [sh -c mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD] delay=5s timeout=1s period=10s #success=1 #failure=3

Environment:
MYSQL_ROOT_PASSWORD: <set to the key 'mysql-root-password' in secret 'mysql'> Optional: false
MYSQL_PASSWORD: <set to the key 'mysql-password' in secret 'mysql'> Optional: true
MYSQL_USER:
MYSQL_DATABASE:
Mounts:
/var/lib/mysql from data (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-dccpv (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
data:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: local-mysql-claim
ReadOnly: false
default-token-dccpv:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-dccpv
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 39s default-scheduler Successfully assigned default/mysql-698897ff79-n768k to docker-desktop
Normal Pulled 38s kubelet, docker-desktop Container image "busybox:1.29.3" already present on machine
Normal Created 38s kubelet, docker-desktop Created container
Normal Started 38s kubelet, docker-desktop Started container
Normal Pulled 18s (x3 over 37s) kubelet, docker-desktop Container image "mysql:5.7.14" already present on machine
Normal Created 17s (x3 over 37s) kubelet, docker-desktop Created container
Normal Started 17s (x3 over 37s) kubelet, docker-desktop Started container
Warning BackOff 13s (x5 over 35s) kubelet, docker-desktop Back-off restarting failed container


When storageClassName was hostpath or did not used the configuration file as

$ helm install --name mysql stable/mysql

it worked fine.



Please tell me how to fix this problem.










share|improve this question
































    0















    I tried to use helm on docker for windows on the local machine. When I used a storage class as local storage, persistent volume, and persistent volume claim without helm, it works fine. But when I used this setting with helm, CrashLoopBackOff happened.



    localStrageClass.yaml



    kind: StorageClass
    apiVersion: storage.k8s.io/v1
    metadata:
    name: local-storage
    provisioner: kubernetes.io/no-provisioner
    volumeBindingMode: WaitForFirstConsumer


    pv.yaml



    apiVersion: v1
    kind: PersistentVolume
    metadata:
    name: local-pv002
    labels:
    type: local
    spec:
    capacity:
    storage: 1Gi
    accessModes:
    - ReadWriteMany
    #storageClassName: hostpath
    mountOptions:
    - hard
    persistentVolumeReclaimPolicy: Delete
    storageClassName: local-storage
    local:
    path: /c/k/share/mysql
    nodeAffinity:
    required:
    nodeSelectorTerms:
    - matchExpressions:
    #- key: docker.io/hostname
    - key: kubernetes.io/hostname
    operator: In
    values:
    - docker-desktop


    pvc.yaml



    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
    name: local-mysql-claim
    spec:
    accessModes:
    - ReadWriteMany
    resources:
    requests:
    storage: 1Gi
    storageClassName: local-storage


    mysqlConf.yaml



    persistence:
    enabled: true
    storageClass: local-storage
    existingClaim: local-mysql-claim
    accessMode: ReadWriteOnce
    size: 1Gi
    annotations:


    $ helm install --name mysql stable/mysql -f mysqlConf.yaml

    $ kubectl describe pod mysql



    Containers:
    mysql:
    Container ID: docker://533e4569603b05fac83a0a701da97898b3190503618796678ac5db6340c4dce6
    Image: mysql:5.7.14
    Image ID: docker-pullable://mysql@sha256:c8f03238ca1783d25af320877f063a36dbfce0daa56a7b4955e6c6e05ab5c70b
    Port: 3306/TCP
    Host Port: 0/TCP
    State: Waiting
    Reason: CrashLoopBackOff
    Last State: Terminated
    Reason: Error
    Exit Code: 1
    Started: Thu, 28 Mar 2019 13:24:25 +0900
    Finished: Thu, 28 Mar 2019 13:24:25 +0900
    Ready: False
    Restart Count: 2
    Requests:
    cpu: 100m
    memory: 256Mi
    Liveness: exec [sh -c mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD] delay=30s timeout=5s period=10s #success=1 #failure=3
    Readiness: exec [sh -c mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD] delay=5s timeout=1s period=10s #success=1 #failure=3

    Environment:
    MYSQL_ROOT_PASSWORD: <set to the key 'mysql-root-password' in secret 'mysql'> Optional: false
    MYSQL_PASSWORD: <set to the key 'mysql-password' in secret 'mysql'> Optional: true
    MYSQL_USER:
    MYSQL_DATABASE:
    Mounts:
    /var/lib/mysql from data (rw)
    /var/run/secrets/kubernetes.io/serviceaccount from default-token-dccpv (ro)
    Conditions:
    Type Status
    Initialized True
    Ready False
    ContainersReady False
    PodScheduled True
    Volumes:
    data:
    Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName: local-mysql-claim
    ReadOnly: false
    default-token-dccpv:
    Type: Secret (a volume populated by a Secret)
    SecretName: default-token-dccpv
    Optional: false
    QoS Class: Burstable
    Node-Selectors: <none>
    Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
    node.kubernetes.io/unreachable:NoExecute for 300s
    Events:
    Type Reason Age From Message
    ---- ------ ---- ---- -------
    Normal Scheduled 39s default-scheduler Successfully assigned default/mysql-698897ff79-n768k to docker-desktop
    Normal Pulled 38s kubelet, docker-desktop Container image "busybox:1.29.3" already present on machine
    Normal Created 38s kubelet, docker-desktop Created container
    Normal Started 38s kubelet, docker-desktop Started container
    Normal Pulled 18s (x3 over 37s) kubelet, docker-desktop Container image "mysql:5.7.14" already present on machine
    Normal Created 17s (x3 over 37s) kubelet, docker-desktop Created container
    Normal Started 17s (x3 over 37s) kubelet, docker-desktop Started container
    Warning BackOff 13s (x5 over 35s) kubelet, docker-desktop Back-off restarting failed container


    When storageClassName was hostpath or did not used the configuration file as

    $ helm install --name mysql stable/mysql

    it worked fine.



    Please tell me how to fix this problem.










    share|improve this question




























      0












      0








      0


      1






      I tried to use helm on docker for windows on the local machine. When I used a storage class as local storage, persistent volume, and persistent volume claim without helm, it works fine. But when I used this setting with helm, CrashLoopBackOff happened.



      localStrageClass.yaml



      kind: StorageClass
      apiVersion: storage.k8s.io/v1
      metadata:
      name: local-storage
      provisioner: kubernetes.io/no-provisioner
      volumeBindingMode: WaitForFirstConsumer


      pv.yaml



      apiVersion: v1
      kind: PersistentVolume
      metadata:
      name: local-pv002
      labels:
      type: local
      spec:
      capacity:
      storage: 1Gi
      accessModes:
      - ReadWriteMany
      #storageClassName: hostpath
      mountOptions:
      - hard
      persistentVolumeReclaimPolicy: Delete
      storageClassName: local-storage
      local:
      path: /c/k/share/mysql
      nodeAffinity:
      required:
      nodeSelectorTerms:
      - matchExpressions:
      #- key: docker.io/hostname
      - key: kubernetes.io/hostname
      operator: In
      values:
      - docker-desktop


      pvc.yaml



      apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
      name: local-mysql-claim
      spec:
      accessModes:
      - ReadWriteMany
      resources:
      requests:
      storage: 1Gi
      storageClassName: local-storage


      mysqlConf.yaml



      persistence:
      enabled: true
      storageClass: local-storage
      existingClaim: local-mysql-claim
      accessMode: ReadWriteOnce
      size: 1Gi
      annotations:


      $ helm install --name mysql stable/mysql -f mysqlConf.yaml

      $ kubectl describe pod mysql



      Containers:
      mysql:
      Container ID: docker://533e4569603b05fac83a0a701da97898b3190503618796678ac5db6340c4dce6
      Image: mysql:5.7.14
      Image ID: docker-pullable://mysql@sha256:c8f03238ca1783d25af320877f063a36dbfce0daa56a7b4955e6c6e05ab5c70b
      Port: 3306/TCP
      Host Port: 0/TCP
      State: Waiting
      Reason: CrashLoopBackOff
      Last State: Terminated
      Reason: Error
      Exit Code: 1
      Started: Thu, 28 Mar 2019 13:24:25 +0900
      Finished: Thu, 28 Mar 2019 13:24:25 +0900
      Ready: False
      Restart Count: 2
      Requests:
      cpu: 100m
      memory: 256Mi
      Liveness: exec [sh -c mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD] delay=30s timeout=5s period=10s #success=1 #failure=3
      Readiness: exec [sh -c mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD] delay=5s timeout=1s period=10s #success=1 #failure=3

      Environment:
      MYSQL_ROOT_PASSWORD: <set to the key 'mysql-root-password' in secret 'mysql'> Optional: false
      MYSQL_PASSWORD: <set to the key 'mysql-password' in secret 'mysql'> Optional: true
      MYSQL_USER:
      MYSQL_DATABASE:
      Mounts:
      /var/lib/mysql from data (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-dccpv (ro)
      Conditions:
      Type Status
      Initialized True
      Ready False
      ContainersReady False
      PodScheduled True
      Volumes:
      data:
      Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
      ClaimName: local-mysql-claim
      ReadOnly: false
      default-token-dccpv:
      Type: Secret (a volume populated by a Secret)
      SecretName: default-token-dccpv
      Optional: false
      QoS Class: Burstable
      Node-Selectors: <none>
      Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
      node.kubernetes.io/unreachable:NoExecute for 300s
      Events:
      Type Reason Age From Message
      ---- ------ ---- ---- -------
      Normal Scheduled 39s default-scheduler Successfully assigned default/mysql-698897ff79-n768k to docker-desktop
      Normal Pulled 38s kubelet, docker-desktop Container image "busybox:1.29.3" already present on machine
      Normal Created 38s kubelet, docker-desktop Created container
      Normal Started 38s kubelet, docker-desktop Started container
      Normal Pulled 18s (x3 over 37s) kubelet, docker-desktop Container image "mysql:5.7.14" already present on machine
      Normal Created 17s (x3 over 37s) kubelet, docker-desktop Created container
      Normal Started 17s (x3 over 37s) kubelet, docker-desktop Started container
      Warning BackOff 13s (x5 over 35s) kubelet, docker-desktop Back-off restarting failed container


      When storageClassName was hostpath or did not used the configuration file as

      $ helm install --name mysql stable/mysql

      it worked fine.



      Please tell me how to fix this problem.










      share|improve this question
















      I tried to use helm on docker for windows on the local machine. When I used a storage class as local storage, persistent volume, and persistent volume claim without helm, it works fine. But when I used this setting with helm, CrashLoopBackOff happened.



      localStrageClass.yaml



      kind: StorageClass
      apiVersion: storage.k8s.io/v1
      metadata:
      name: local-storage
      provisioner: kubernetes.io/no-provisioner
      volumeBindingMode: WaitForFirstConsumer


      pv.yaml



      apiVersion: v1
      kind: PersistentVolume
      metadata:
      name: local-pv002
      labels:
      type: local
      spec:
      capacity:
      storage: 1Gi
      accessModes:
      - ReadWriteMany
      #storageClassName: hostpath
      mountOptions:
      - hard
      persistentVolumeReclaimPolicy: Delete
      storageClassName: local-storage
      local:
      path: /c/k/share/mysql
      nodeAffinity:
      required:
      nodeSelectorTerms:
      - matchExpressions:
      #- key: docker.io/hostname
      - key: kubernetes.io/hostname
      operator: In
      values:
      - docker-desktop


      pvc.yaml



      apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
      name: local-mysql-claim
      spec:
      accessModes:
      - ReadWriteMany
      resources:
      requests:
      storage: 1Gi
      storageClassName: local-storage


      mysqlConf.yaml



      persistence:
      enabled: true
      storageClass: local-storage
      existingClaim: local-mysql-claim
      accessMode: ReadWriteOnce
      size: 1Gi
      annotations:


      $ helm install --name mysql stable/mysql -f mysqlConf.yaml

      $ kubectl describe pod mysql



      Containers:
      mysql:
      Container ID: docker://533e4569603b05fac83a0a701da97898b3190503618796678ac5db6340c4dce6
      Image: mysql:5.7.14
      Image ID: docker-pullable://mysql@sha256:c8f03238ca1783d25af320877f063a36dbfce0daa56a7b4955e6c6e05ab5c70b
      Port: 3306/TCP
      Host Port: 0/TCP
      State: Waiting
      Reason: CrashLoopBackOff
      Last State: Terminated
      Reason: Error
      Exit Code: 1
      Started: Thu, 28 Mar 2019 13:24:25 +0900
      Finished: Thu, 28 Mar 2019 13:24:25 +0900
      Ready: False
      Restart Count: 2
      Requests:
      cpu: 100m
      memory: 256Mi
      Liveness: exec [sh -c mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD] delay=30s timeout=5s period=10s #success=1 #failure=3
      Readiness: exec [sh -c mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD] delay=5s timeout=1s period=10s #success=1 #failure=3

      Environment:
      MYSQL_ROOT_PASSWORD: <set to the key 'mysql-root-password' in secret 'mysql'> Optional: false
      MYSQL_PASSWORD: <set to the key 'mysql-password' in secret 'mysql'> Optional: true
      MYSQL_USER:
      MYSQL_DATABASE:
      Mounts:
      /var/lib/mysql from data (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-dccpv (ro)
      Conditions:
      Type Status
      Initialized True
      Ready False
      ContainersReady False
      PodScheduled True
      Volumes:
      data:
      Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
      ClaimName: local-mysql-claim
      ReadOnly: false
      default-token-dccpv:
      Type: Secret (a volume populated by a Secret)
      SecretName: default-token-dccpv
      Optional: false
      QoS Class: Burstable
      Node-Selectors: <none>
      Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
      node.kubernetes.io/unreachable:NoExecute for 300s
      Events:
      Type Reason Age From Message
      ---- ------ ---- ---- -------
      Normal Scheduled 39s default-scheduler Successfully assigned default/mysql-698897ff79-n768k to docker-desktop
      Normal Pulled 38s kubelet, docker-desktop Container image "busybox:1.29.3" already present on machine
      Normal Created 38s kubelet, docker-desktop Created container
      Normal Started 38s kubelet, docker-desktop Started container
      Normal Pulled 18s (x3 over 37s) kubelet, docker-desktop Container image "mysql:5.7.14" already present on machine
      Normal Created 17s (x3 over 37s) kubelet, docker-desktop Created container
      Normal Started 17s (x3 over 37s) kubelet, docker-desktop Started container
      Warning BackOff 13s (x5 over 35s) kubelet, docker-desktop Back-off restarting failed container


      When storageClassName was hostpath or did not used the configuration file as

      $ helm install --name mysql stable/mysql

      it worked fine.



      Please tell me how to fix this problem.







      kubernetes kubernetes-helm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 5:04







      k_trader

















      asked Mar 28 at 4:48









      k_traderk_trader

      236 bronze badges




      236 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          1
















          I think you are having a mismatch of accessModes between what you claim in PVC definition (ReadWriteOnce) and what your Storage Class offers (ReadWriteMany).



          Please mind also that PersistentVolume(s) of HostPath type does not support ReadWriteMany mode (see spec here).



          I would propose you to create PV similar to this one:



          # Create PV of manual StorageClass
          kind: PersistentVolume
          apiVersion: v1
          metadata:
          name: task-pv-volume
          labels:
          type: local
          spec:
          storageClassName: manual
          capacity:
          storage: 10Gi
          accessModes:
          - ReadWriteOnce
          hostPath:
          path: "/C/Users/K8S/mysql"


          and override default PVC storageClassName configuration during helm install like this:



          helm install --name my-sql stable/mysql --set persistence.storageClass=manual





          share|improve this answer

























          • I tried your suggestion, but it caused ’FailedScheduling: pod has unbound immediate PersistentVolumeClaims’. So, I changed only "ReadWriteMany" to "ReadWriteOnce" and "local-storage" to "manual", it works fine. Thank you for your cooperation!

            – k_trader
            Mar 28 at 18:37












          • I`m happy I could help you. I have tested it on minikube on Windows, not Docker Desktop, hence probably the issue with running the above recipe as it is.

            – Nepomucen
            Mar 29 at 8:45











          • It seems that this problem depends on the version of kubectl and helm because kubectl 1.14 and helm 1.13 cause same type of trouble but the combination of kubectl 1.14 beta and helm 1.12 worked fine. Thank you for your advice. I will use minikube instead of Docker Desktop which is fragile and unstable.

            – k_trader
            Mar 29 at 9:54











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55390348%2fkubernetes-with-helm-on-local-persistent-volume-with-docker-for-windows%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1
















          I think you are having a mismatch of accessModes between what you claim in PVC definition (ReadWriteOnce) and what your Storage Class offers (ReadWriteMany).



          Please mind also that PersistentVolume(s) of HostPath type does not support ReadWriteMany mode (see spec here).



          I would propose you to create PV similar to this one:



          # Create PV of manual StorageClass
          kind: PersistentVolume
          apiVersion: v1
          metadata:
          name: task-pv-volume
          labels:
          type: local
          spec:
          storageClassName: manual
          capacity:
          storage: 10Gi
          accessModes:
          - ReadWriteOnce
          hostPath:
          path: "/C/Users/K8S/mysql"


          and override default PVC storageClassName configuration during helm install like this:



          helm install --name my-sql stable/mysql --set persistence.storageClass=manual





          share|improve this answer

























          • I tried your suggestion, but it caused ’FailedScheduling: pod has unbound immediate PersistentVolumeClaims’. So, I changed only "ReadWriteMany" to "ReadWriteOnce" and "local-storage" to "manual", it works fine. Thank you for your cooperation!

            – k_trader
            Mar 28 at 18:37












          • I`m happy I could help you. I have tested it on minikube on Windows, not Docker Desktop, hence probably the issue with running the above recipe as it is.

            – Nepomucen
            Mar 29 at 8:45











          • It seems that this problem depends on the version of kubectl and helm because kubectl 1.14 and helm 1.13 cause same type of trouble but the combination of kubectl 1.14 beta and helm 1.12 worked fine. Thank you for your advice. I will use minikube instead of Docker Desktop which is fragile and unstable.

            – k_trader
            Mar 29 at 9:54
















          1
















          I think you are having a mismatch of accessModes between what you claim in PVC definition (ReadWriteOnce) and what your Storage Class offers (ReadWriteMany).



          Please mind also that PersistentVolume(s) of HostPath type does not support ReadWriteMany mode (see spec here).



          I would propose you to create PV similar to this one:



          # Create PV of manual StorageClass
          kind: PersistentVolume
          apiVersion: v1
          metadata:
          name: task-pv-volume
          labels:
          type: local
          spec:
          storageClassName: manual
          capacity:
          storage: 10Gi
          accessModes:
          - ReadWriteOnce
          hostPath:
          path: "/C/Users/K8S/mysql"


          and override default PVC storageClassName configuration during helm install like this:



          helm install --name my-sql stable/mysql --set persistence.storageClass=manual





          share|improve this answer

























          • I tried your suggestion, but it caused ’FailedScheduling: pod has unbound immediate PersistentVolumeClaims’. So, I changed only "ReadWriteMany" to "ReadWriteOnce" and "local-storage" to "manual", it works fine. Thank you for your cooperation!

            – k_trader
            Mar 28 at 18:37












          • I`m happy I could help you. I have tested it on minikube on Windows, not Docker Desktop, hence probably the issue with running the above recipe as it is.

            – Nepomucen
            Mar 29 at 8:45











          • It seems that this problem depends on the version of kubectl and helm because kubectl 1.14 and helm 1.13 cause same type of trouble but the combination of kubectl 1.14 beta and helm 1.12 worked fine. Thank you for your advice. I will use minikube instead of Docker Desktop which is fragile and unstable.

            – k_trader
            Mar 29 at 9:54














          1














          1










          1









          I think you are having a mismatch of accessModes between what you claim in PVC definition (ReadWriteOnce) and what your Storage Class offers (ReadWriteMany).



          Please mind also that PersistentVolume(s) of HostPath type does not support ReadWriteMany mode (see spec here).



          I would propose you to create PV similar to this one:



          # Create PV of manual StorageClass
          kind: PersistentVolume
          apiVersion: v1
          metadata:
          name: task-pv-volume
          labels:
          type: local
          spec:
          storageClassName: manual
          capacity:
          storage: 10Gi
          accessModes:
          - ReadWriteOnce
          hostPath:
          path: "/C/Users/K8S/mysql"


          and override default PVC storageClassName configuration during helm install like this:



          helm install --name my-sql stable/mysql --set persistence.storageClass=manual





          share|improve this answer













          I think you are having a mismatch of accessModes between what you claim in PVC definition (ReadWriteOnce) and what your Storage Class offers (ReadWriteMany).



          Please mind also that PersistentVolume(s) of HostPath type does not support ReadWriteMany mode (see spec here).



          I would propose you to create PV similar to this one:



          # Create PV of manual StorageClass
          kind: PersistentVolume
          apiVersion: v1
          metadata:
          name: task-pv-volume
          labels:
          type: local
          spec:
          storageClassName: manual
          capacity:
          storage: 10Gi
          accessModes:
          - ReadWriteOnce
          hostPath:
          path: "/C/Users/K8S/mysql"


          and override default PVC storageClassName configuration during helm install like this:



          helm install --name my-sql stable/mysql --set persistence.storageClass=manual






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 12:05









          NepomucenNepomucen

          1,3061 gold badge1 silver badge10 bronze badges




          1,3061 gold badge1 silver badge10 bronze badges















          • I tried your suggestion, but it caused ’FailedScheduling: pod has unbound immediate PersistentVolumeClaims’. So, I changed only "ReadWriteMany" to "ReadWriteOnce" and "local-storage" to "manual", it works fine. Thank you for your cooperation!

            – k_trader
            Mar 28 at 18:37












          • I`m happy I could help you. I have tested it on minikube on Windows, not Docker Desktop, hence probably the issue with running the above recipe as it is.

            – Nepomucen
            Mar 29 at 8:45











          • It seems that this problem depends on the version of kubectl and helm because kubectl 1.14 and helm 1.13 cause same type of trouble but the combination of kubectl 1.14 beta and helm 1.12 worked fine. Thank you for your advice. I will use minikube instead of Docker Desktop which is fragile and unstable.

            – k_trader
            Mar 29 at 9:54


















          • I tried your suggestion, but it caused ’FailedScheduling: pod has unbound immediate PersistentVolumeClaims’. So, I changed only "ReadWriteMany" to "ReadWriteOnce" and "local-storage" to "manual", it works fine. Thank you for your cooperation!

            – k_trader
            Mar 28 at 18:37












          • I`m happy I could help you. I have tested it on minikube on Windows, not Docker Desktop, hence probably the issue with running the above recipe as it is.

            – Nepomucen
            Mar 29 at 8:45











          • It seems that this problem depends on the version of kubectl and helm because kubectl 1.14 and helm 1.13 cause same type of trouble but the combination of kubectl 1.14 beta and helm 1.12 worked fine. Thank you for your advice. I will use minikube instead of Docker Desktop which is fragile and unstable.

            – k_trader
            Mar 29 at 9:54

















          I tried your suggestion, but it caused ’FailedScheduling: pod has unbound immediate PersistentVolumeClaims’. So, I changed only "ReadWriteMany" to "ReadWriteOnce" and "local-storage" to "manual", it works fine. Thank you for your cooperation!

          – k_trader
          Mar 28 at 18:37






          I tried your suggestion, but it caused ’FailedScheduling: pod has unbound immediate PersistentVolumeClaims’. So, I changed only "ReadWriteMany" to "ReadWriteOnce" and "local-storage" to "manual", it works fine. Thank you for your cooperation!

          – k_trader
          Mar 28 at 18:37














          I`m happy I could help you. I have tested it on minikube on Windows, not Docker Desktop, hence probably the issue with running the above recipe as it is.

          – Nepomucen
          Mar 29 at 8:45





          I`m happy I could help you. I have tested it on minikube on Windows, not Docker Desktop, hence probably the issue with running the above recipe as it is.

          – Nepomucen
          Mar 29 at 8:45













          It seems that this problem depends on the version of kubectl and helm because kubectl 1.14 and helm 1.13 cause same type of trouble but the combination of kubectl 1.14 beta and helm 1.12 worked fine. Thank you for your advice. I will use minikube instead of Docker Desktop which is fragile and unstable.

          – k_trader
          Mar 29 at 9:54






          It seems that this problem depends on the version of kubectl and helm because kubectl 1.14 and helm 1.13 cause same type of trouble but the combination of kubectl 1.14 beta and helm 1.12 worked fine. Thank you for your advice. I will use minikube instead of Docker Desktop which is fragile and unstable.

          – k_trader
          Mar 29 at 9:54









          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55390348%2fkubernetes-with-helm-on-local-persistent-volume-with-docker-for-windows%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Obelisk of Theodosius Contents History Description Notes Bibliography Further reading External links Navigation menuAge of spirituality : late antique and early Christian art, third to seventh centuryOver 60 picturesObelisks of the World41°00′21.24″N 28°58′31.43″E / 41.0059000°N 28.9753972°E / 41.0059000; 28.97539727724550-7235741376235741376

          밀양 대씨 역사 각주 함께 보기 둘러보기 메뉴밀양 대씨

          1973년 목차 사건 문화 탄생 사망 노벨상 달력 둘러보기 메뉴