From the course: Certified Kubernetes Administrator (CKA) Cert Prep (2024)

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Lesson 4 lab solution: Setting up storage

Lesson 4 lab solution: Setting up storage

- Okay, so let's do this lab. And in this lab, well, the challenge is that we need to provide host path storage to the directory/storage. So you know what? sudo mkdir /storage. (keyboard clicking) And here sudo (keyboard clicking) mkdir /storage. The thing is that host path is by nature bound to a specific host. Here we don't know where the actual application is going to end, so I need to create the storage on two nodes. And I am going to use sudo vim /storage/index.html and I'm going to cheat, I'm not calling it, "Hello Lab4", I'm calling it, "Hello Worker2". And then you can probably guess what it is that I'm going to do on worker1. So sudo vim /storage (keyboard clicking) /index.html, and hello worker1. All right, now we can talk about this host path persistent volume. Now if you need to do things like this on the exam, unless you have a brilliant mind of course, I would definitely go to the documentation. Just look for persistent volume. (keyboard clicking) And there we get…

Contents