some-grass-84903
01/11/2024, 2:06 PMpodspec
of a task with e.g. V1NFSVolumeSource
to mount the NFS to the container.
While that generally works, I'm running into permission issues with the flytekit docker image (most likely because it's starting with the flytekit user).
When I'm trying to access the mounted NFS path either with python and linux commands I run into permission issues. And that also makes sense looking at the file system (data being the nfs mount):
d--------- 8 root root 4096 Jan 11 13:48 data
drwxr-xr-x 1 flytekit flytekit 4096 Sep 3 2022 home
The NFS definitely works as I was able to mount and access it over some dummy nginx container.
My last attempt was to let kubernetes adjust the permissions properly by using securityContext
with fsGroup: 1000
(which should be the flytekit group), but no difference.
Happy for any tips!
And I definitely can provide more details if necessary.some-grass-84903
01/11/2024, 2:33 PMsome-grass-84903
01/11/2024, 2:34 PMaverage-finland-92144
01/11/2024, 9:59 PMaverage-finland-92144
01/11/2024, 10:14 PMaverage-finland-92144
01/11/2024, 10:19 PMk describe csidriver <http://efs.csi.aws.com|efs.csi.aws.com>
Name: <http://efs.csi.aws.com|efs.csi.aws.com>
Namespace:
Labels: <none>
Annotations: <none>
API Version: <http://storage.k8s.io/v1|storage.k8s.io/v1>
Kind: CSIDriver
Metadata:
Creation Timestamp: 2023-12-07T11:24:19Z
Resource Version: 273
UID: 92832eb0-c7c2-4d93-9bcd-70af57192b5e
Spec:
Attach Required: false
Fs Group Policy: ReadWriteOnceWithFSType
Pod Info On Mount: false
Requires Republish: false
Storage Capacity: false
Volume Lifecycle Modes:
Persistent
As I haven't added fstype
to the spec, probably whatever I set in the podSecurityContext
will be ignoredsome-grass-84903
01/12/2024, 7:52 AMso what's happening here is that even if you set the fsGroup this not reflected in the actual mount?Exactly.
some-grass-84903
01/12/2024, 7:55 AMV1NFSVolumeSource
.
This is the only one I have:
ā ~ k get csidriver
NAME ATTACHREQUIRED PODINFOONMOUNT STORAGECAPACITY TOKENREQUESTS REQUIRESREPUBLISH MODES AGE
<http://csi.tigera.io|csi.tigera.io> true true false <unset> false Ephemeral 22d
ā ~ k describe csidriver <http://csi.tigera.io|csi.tigera.io>
Name: <http://csi.tigera.io|csi.tigera.io>
Namespace:
Labels: <none>
Annotations: <none>
API Version: <http://storage.k8s.io/v1|storage.k8s.io/v1>
Kind: CSIDriver
Metadata:
Creation Timestamp: 2023-12-20T09:47:02Z
Owner References:
API Version: <http://operator.tigera.io/v1|operator.tigera.io/v1>
Block Owner Deletion: true
Controller: true
Kind: Installation
Name: default
UID: 7a335290-5260-4ac7-95f9-3ad30944954e
Resource Version: 6562
UID: 6b40282e-3aec-49f8-b549-f4518403026d
Spec:
Attach Required: true
Fs Group Policy: ReadWriteOnceWithFSType
Pod Info On Mount: true
Requires Republish: false
Se Linux Mount: false
Storage Capacity: false
Volume Lifecycle Modes:
Ephemeral
Events: <none>
some-grass-84903
01/12/2024, 7:57 AMaverage-finland-92144
01/12/2024, 1:58 PMsome-grass-84903
01/12/2024, 4:32 PM