Ok,As of now, I’ve deployed my hugo blog(static website) using linux on a VPS. Now, I want to host it using kubernetes. I’m purely doing this gymanstic for the learning of kubernetes.
There is nothing different to deploy a k8s pod, you’ll need to build a Docker image for static site first, and serving generated static files via any web server inside the container, such as Nginx, Apache, Caddy and so on, the rest of steps is similar.
Dockerfile pseudo-code
# build stage
FROM <some-hugo-image> as builder
WORKDIR /src
COPY . /src
# the default output folder is /src/public
RUN hugo --minify ....
# final stage
FROM some-web-server-image
COPY --from=builder /src/public /path/to/webroot
1 Like
I think I need in-depth kuberentes learning.
1 Like