Michel Rouly
02/01/2022, 11:19 PMdagster-k8s/config
-- would be nice to also set storage requests, and then meet the requests by creating a PVC.
The lifecycle I'm picturing would look like:
• dagster spawns job and pvc mount
• PVC spawns (or matches existing) PV
◦ if new PV, new backing resource (e.g. AWS EBS) is spawned as well
• dagster job mounts new PVC with the requested storage
• job runs!
• job terminates, pod terminates, PVC is released, PV is expired/persisted based on policydagster-k8s/config
is that the PVC I'm describing does not exist before the Dagster job is spawned.
So I can't simply use volumes
and volumeMounts
to refer to an existing PVC.Andrea Giardini
02/02/2022, 8:49 AMMichel Rouly
02/02/2022, 1:09 PMAndrea Giardini
02/02/2022, 1:13 PMMichel Rouly
02/02/2022, 1:22 PMUnable to attach or mount volumes: unmounted volumes=[test-storage], unattached volumes=[test-storage kube-api-access-mcffp]: failed to get Plugin from volumeSpec for volume "test-storage" err=no volume plugin matched
apiVersion: v1
kind: Pod
metadata:
name: test
spec:
containers:
- command: [ls]
image: debian
imagePullPolicy: Always
name: debian
volumeMounts:
- name: test-storage
mountPath: /mnt
volumes:
- name: test-storage
ephemeral:
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: gp2-encrypted
volumeMode: Filesystem
Andrea Giardini
02/02/2022, 1:38 PMgp2-encrypted
storage class defined?Michel Rouly
02/02/2022, 1:39 PMapiVersion: <http://storage.k8s.io/v1|storage.k8s.io/v1>
kind: StorageClass
metadata:
annotations:
<http://storageclass.kubernetes.io/is-default-class|storageclass.kubernetes.io/is-default-class>: "true"
name: gp2-encrypted
parameters:
encrypted: "true"
fsType: ext4
type: gp2
allowVolumeExpansion: false
provisioner: <http://kubernetes.io/aws-ebs|kubernetes.io/aws-ebs>
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
ContainerCreating
.gp2-encrypted
storageclass works fine. I've seen no difference in behavior, we get the same plugin error either way.Andrea Giardini
02/02/2022, 1:50 PMMichel Rouly
02/02/2022, 1:50 PMHowever, you can create a new cluster with the same Kubernetes version and enable the API server logging when you create the cluster. Clusters with the same platform version have the same flags enabled, so your flags should match the new cluster's flags. When you finish viewing the flags for the new cluster in CloudWatch, you can delete the new cluster.ah
Andrea Giardini
02/02/2022, 2:04 PMMichel Rouly
02/02/2022, 2:05 PMAndrea Giardini
02/04/2022, 4:35 PMMichel Rouly
02/04/2022, 4:39 PMAndrea Giardini
02/04/2022, 4:50 PMv1.21.6-gke.1500
I can create ephemeral volumes successfully. I tried a simple pod yaml file, I will try to build something on Dagster soonMichel Rouly
02/18/2022, 4:13 PM