mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
git-blog-demo
This demo shows how to use the git-sync sidekick container along side volumes and volumeMounts to create a markdown powered blog.
How it works
The pod is composed of 3 containers that share directories using 2 volumes:
- The
git-synccontainer clones a git repo into themarkdownvolume - The
hugocontainer read from themarkdownvolume and render it into thehtmlvolume. - The
nginxcontainer serve the content from thehtmlvolume.
Usage
Build the demo containers, and push them to a registry `` docker build -t /git-sync .. docker build -t /hugo hugo/ docker push /hugo /git-sync
Create the pod and the service for the blog
kubectl pods create config/pod.html kubectl services create config/pod.html
Open the external ip in your browser