我需要从Kative函数内的SMB://共享中读取文件。有可能吗?
我尝试装载卷共享(PersistentVolume/PersistentVolumeClaim)。但似乎KNative服务不支持卷功能(支持的卷类型https://github.com/knative/docs/blob/51b878d8ebb494e48cfa5f4214defe92e85eb491/docs/serving/spec/knative-api-specification-1.0.md#volume).
错误描述:
for: "service.yaml":
error when patching "service.yaml": admission webhook "validation.webhook.serving.knative.dev" 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
我还在Pod容器内执行了mount命令。但也收到了一个错误:
mount -t cifs "//IP/SHARE" "/data" -o "username=debian"
Unable to apply new capability set.
1条答案
按热度按时间xfyts7mz1#
管理员可以使用功能标记
kubernetes.podspec-persistent-volume-claim
(和kubernetes.podspec-persistent-volume-write
)来装载永久卷,包括SMB共享。这些在默认情况下是禁用的,因为卷装载可能会给应用程序带来可伸缩性、性能和正确性方面的挑战,并且可能会限制跨群集的可移植性。在Kative中有一些像这样的护栏,其目标是默认使用更便携、更少与主机链接的配置。