title: How to mount volumes on kubernetes using emptyDir
body: <p>I am trying to create a deployment out of my kompose file, but whenever I try: </p>
  
  <pre><code>kompose convert -f docker-compose.yaml
  </code></pre>
  
  <p>I get the error: </p>
  
  <pre><code>Volume mount on the host "[file directory]" isn't supported - ignoring path on the host
  </code></pre>
  
  <p>I have tried a few different solutions to my issue, firstly trying to add <code>hostPath</code> to my <code>kompose convert</code> as well as using persistent volumes, however both do not work.</p>
  
  <p>my kompose files looks like this: </p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    annotations:
      kompose.cmd: kompose convert -f docker-compose.yaml --volumes emptyDir
      kompose.version: 1.7.0 (HEAD)
    creationTimestamp: null
    labels:
      io.kompose.service: es01
    name: es01
  spec:
    replicas: 1
    strategy:
      type: Recreate
    template:
      metadata:
        creationTimestamp: null
        labels:
          io.kompose.service: es01
      spec:
        containers:
        - env:
          - name: COMPOSE_CONVERT_WINDOWS_PATHS
            value: "1"
          - name: COMPOSE_PROJECT_NAME
            value: elastic_search_container
          - name: ES_JAVA_OPTS
            value: -Xms7g -Xmx7g
          - name: discovery.type
            value: single-node
          - name: node.name
            value: es01
          image: docker.elastic.co/elasticsearch/elasticsearch:7.2.1
          name: es01
          ports:
          - containerPort: 9200
          resources: {}
          volumeMounts:
          - mountPath: /usr/share/elasticsearch/data
            name: es01-empty0
        restartPolicy: Always
        volumes:
        - emptyDir: {}
          name: es01-empty0
  status: {}
  </code></pre>
  
  <p>I am using kompose version 1.7.0 </p>
  
  <p>My Docker Compose version: </p>
  
  <pre><code>version: '3'
  services:
    es01:
      image: docker.elastic.co/elasticsearch/elasticsearch:7.2.1
      container_name: es01
      environment:
        - node.name=es01
        - COMPOSE_PROJECT_NAME=elastic_search_container
        - discovery.type=single-node
        - "ES_JAVA_OPTS=-Xms7g -Xmx7g"
        - COMPOSE_CONVERT_WINDOWS_PATHS=1
      ulimits:
        nproc: 3000
        nofile: 65536
        memlock: -1
      volumes:
        - /home/centos/Sprint0Demo/Servers/elasticsearch:/usr/share/elasticsearch/data
      ports:
        - 9200:9200
      networks:
        - kafka_demo
  </code></pre>