<p>I have a kubernetes volume mount pointing to azure files. How do I restrict files present in azure files to my container?</p>

<p>My requirement is to push the files only to azure files but I shouldn't load the files back to the container.</p>

<pre><code>      volumeMounts:
        - name: testlog
          mountPath: /app/testlog/
  volumes:
    - name: testlog
      azureFile:
        secretName: testlog-secret
        shareName: testlog
        readOnly: false
</code></pre>

magic
<p>To manage the content within an Azure File PVC, you should</p>

<p>1) create the Storage Account before hand
<a href="https://learn.microsoft.com/en-us/rest/api/storagerp/storage-sample-create-account" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/rest/api/storagerp/storage-sample-create-account</a></p>

<p>2) manage its content using the API directly within your container/application code
<a href="https://learn.microsoft.com/en-us/rest/api/storageservices/file-service-rest-api" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/rest/api/storageservices/file-service-rest-api</a></p>

<p>for example to create a directly
<a href="https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/rest/api/storageservices/create-directory</a>
and files within that directory
<a href="https://learn.microsoft.com/en-us/rest/api/storageservices/create-file" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/rest/api/storageservices/create-file</a></p>

<p>If you have a specific language and you do not want to use the http API directly, MSFT have created a few SKDs to manage Storage accounts</p>

<p>Here's an example in GO</p>

<p><a href="https://github.com/Azure/azure-storage-file-go" rel="nofollow noreferrer">https://github.com/Azure/azure-storage-file-go</a></p>
