<p>I'm trying to deploy a login consent provider with hydra.</p>

<p>Here is the <code>yaml</code> file.</p>

<pre><code>---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: login-consent-deployment
  labels:
    app: login-consent-nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: login-consent-nginx
  template:
    metadata:
      labels:
        app: login-consent-nginx
    spec:
      containers:
      - name: login-consent-nginx
        image: ubergarm/openresty-nginx-jwt:latest
        command: ["/usr/local/openresty/bin/openresty", "-g", "daemon off;", "-c", "/usr/local/openresty/nginx/conf/nginx.conf"]
        ports:
        - name: http-lc-port
          containerPort: 80
        resources:
          limits:
            cpu: "0.1"
            memory: 32Mi
        volumeMounts:
        - mountPath: /etc/nginx/conf.d
          name: login-consent-nginx-conf-volume
        - mountPath: /usr/local/openresty/nginx/html
          name: login-consent-www-resources
      volumes:
      - name: login-consent-nginx-conf-volume
        configMap:
          name: login-consent-conf
          items:
            - key: login-consent.conf
              path: login-consent.conf
      - name: login-consent-www-resources
        hostPath:
          path: C:\Users\myUser\www
          type: Directory

---
apiVersion: v1
kind: Service
metadata:
  name: login-consent-service
spec:
  type: LoadBalancer
  selector:
    app: login-consent-nginx
  ports:
  - protocol: TCP
    name: http-lc-nginx
    port: 3000
    targetPort: http-lc-port
</code></pre>

<p>The error I get in the pod description after deployment</p>

<pre><code>Warning  FailedMount            2s (x4 over 6s)  kubelet, docker-for-desktop  MountVolume.SetUp failed for volume "login-consent-www-resources" : hostPath type check failed: C:\Users\myUser\www is not a directory
</code></pre>

<p><code>www</code> is a folder in my user home directory</p>

<pre><code>$docker run --rm -v c:/Users/myUser:/data alpine ls /data
3D Objects
...
...
...
...
www
</code></pre>

<p>I wonder what I'm doing wrong here? I'm using docker for windows with its own integrated Kubernetes and I have enabled my shared folder C inside dockers.</p>

<p>Any help?</p>

Ziko
<p>So, inside the docker container, your <code>c:/Users/myUser</code> is now available as <code>/data</code>. Hence, you have to use <code>/data/www</code> as the hostpath.</p>
