k3s/contrib/git-sync/demo
Tim Hockin e0e6741027 Stop using named ports in examples and scripts. 2015-03-01 21:30:45 -08:00
..
blog contrib/git-sync: add demo 2015-02-02 18:02:18 -08:00
config Stop using named ports in examples and scripts. 2015-03-01 21:30:45 -08:00
hugo contrib/git-sync: fix demo 2015-02-05 17:11:44 -08:00
README.md contrib/git-sync/demo: fix README, add license header 2015-02-02 18:05:57 -08:00

README.md

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-sync container clones a git repo into the markdown volume
  • The hugo container read from the markdown volume and render it into the html volume.
  • The nginx container serve the content from the html volume.

Usage

Build the demo containers, and push them to a registry

docker build -t <some-registry>/git-sync ..
docker build -t <some-registry>/hugo hugo/
docker push <some-registry>/hugo <some-registry>/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 service external ip in your browser