<p>I need to read file from smb:// share within Knative function. Is it possible?</p>
<p>I tried to mount share with Volumes (PersistentVolume/PersistentVolumeClaim). But seems Knative services don't support Volume functionality (supported volume types <a href="https://github.com/knative/docs/blob/51b878d8ebb494e48cfa5f4214defe92e85eb491/docs/serving/spec/knative-api-specification-1.0.md#volume" rel="nofollow noreferrer">https://github.com/knative/docs/blob/51b878d8ebb494e48cfa5f4214defe92e85eb491/docs/serving/spec/knative-api-specification-1.0.md#volume</a>).</p>
<p>Error description:</p>
<pre><code>for: &quot;service.yaml&quot;: 
error when patching &quot;service.yaml&quot;: admission webhook &quot;validation.webhook.serving.knative.dev&quot; denied the request: 
validation failed: 
Persistent volume claim support is disabled, but found persistent volume claim pvc-smb:
Persistent volume write support is disabled, but found persistent volume claim pvc-smb that is not read-only:
must not set the field(s): spec.template.spec.volumes[0].persistentVolumeClaim
</code></pre>
<p>I also executed mount command within pod container. But also received an error:</p>
<pre><code>mount -t cifs &quot;//IP/SHARE&quot; &quot;/data&quot; -o &quot;username=debian&quot;
Unable to apply new capability set.
</code></pre>

<p>There is a <a href="https://github.com/knative/serving/blob/main/config/core/configmaps/features.yaml#L173" rel="nofollow noreferrer">feature flag <code>kubernetes.podspec-persistent-volume-claim</code> (and <code>kubernetes.podspec-persistent-volume-write</code>)</a> which an administrator can use to enable mounting persistent volumes, including SMB shares.</p>
<p>These are disabled by default because volume mounts can impose scalability, performance, and correctness challenges for applications, and may restrict portability across clusters. There are some guard rails like this in Knative, with a goal of defaulting to more portable and less host-linked configuration.</p>
