Comment on What's the best approach to deploy a static website to K8s cluster from a CI pipeline?
pacology@lemmy.world 1 year ago
My advice would be to have the server running on the cluster serving the static folder mounted through a network drive in the container. Then you just need to sync the content to the drive as the last step in your CI.
Alternatively, you will need to bake the static content in the container but then you will have to host it somewhere for the closer to get.
xinayder@infosec.pub 1 year ago
How is this different than mounting the folder with the static website using
hostPath
?pacology@lemmy.world 1 year ago
I imagine you are using k8s because you want to learn the platform.
In a real cluster with multiple machines, you don’t know which machine will run your container (that’s the point of clusters).
Do you need to host your files on a storage server and link these files to the containers through nfs.
See this post for an example on his to do it.