0:00 So now we've implemented our load product job 0:04 inside of Kubernetes. However, we have an existing issue with this 0:08 setup that I want to show you in this lecture. 0:10 So let's go ahead and get started by firstly checking the 0:13 pods inside of job or 0:14 namespace. So what I want to do is let's go ahead and 0:18 delete 0:19 this jobs pod. 0:24 So we'll go ahead and delete this pod. 0:25 So wait until this jobs pod gets deleted and a new one gets 0:29 recreated, and then we'll go ahead and continue from there. 0:33 All right, so this pod was deleted. 0:35 And so now if we run get pods, we can see the new one that spawned here. 0:39 Now, what I want to show you is if we go back to GraphQL 0:42 playground where we can interact with our Kubernetes cluster, 0:46 we could still, of course, log in. 0:49 And now what I want to show you is if we try to re-execute the load product 0:52 job 0:53 with the same file here that I previously uploaded 0:57 and we know was uploaded correctly, well, if we try to execute this, you can 1:01 see we get an error message saying, "Failed to read file. 1:04 The product does not exist." Now, the reason why we see this 1:08 is because we just deleted the jobs pod, and by 1:12 default, all storage inside of Kubernetes 1:15 is ephemeral, 1:16 meaning we've written this product file data directly to the 1:20 pod 1:21 storage. However, when that pod gets deleted, then all of the 1:25 data associated with it also gets deleted. 1:28 And so we do not want this. What we want is for the product 1:32 file data we uploaded to be persisted even if the pod 1:36 gets deleted. 1:37 Additionally, if we scale up to additional jobs pods 1:41 here, we want the 1:41 same product file data shared to all of those pods so that
The rest of the transcript is for members.
Sign in