Welcome to the Linux Foundation Forum!

Lab 3.12 local registry - volume not used?

In this lab we create two PersistentVolume's pointing to /tmp/data and /tmp/nginx but later we create the folders /localdocker/data and /localdocker/nginx they will never be used though, right?

I fixed it by changing the vol1.yaml and vol2.yaml to point to /localdocker/data and /localdocker/nginx. Then I found out that this did work but on the node the localregistry got deployed to. In my case worker2. I created a master and two workers not allowing deployments on master.
Now on a reboot of my local virtualMachine (virtualbox) setup it is very possible that they will be spun up on a different node the next time and I lose my pushed images. This actually happened already :-)

I also noticed that the volumes are bound "randomly" to one of the claims and in my case nginx got bound to data and registry to nginx. This felt weird and unwanted...

Are these things wil will solve later on in the course or am I missing something here?

Thanks.

Comments

  • chrispokorni
    chrispokorni Posts: 2,346

    Hi @ivonet,

    Both sets are used in various steps in the lab exercise. In step 4 the localdocker/data and /localdocker/nginxdirectories are mounted by the containers run with docker-compose, while in step 10 the /tmp/data and /tmp/nginx directories are mounted through the help of the two Persistent Volumes.

    Regards,
    -Chris

  • ivonet
    ivonet Posts: 8

    Ok thanks, It would have been nice to have been told that the config was still faulty and not to worry. I have looked at if for hours without the knowledge (yet :p ) to fix it, because I knew something was wrong.

  • chrispokorni
    chrispokorni Posts: 2,346

    Hi @ivonet,

    The capability of an application to run in one environment with one configuration and then again in a different environment with a different configuration shows that objects are decoupled from their resources, which is one of the main principles behind containerized microservices.

    Regards,
    -Chris

Categories

Upcoming Training