k3s/contrib/git-sync/demo
nikhiljindal 2e9e46dd08 Updating scripts to use v1 instead of v1beta3 2015-07-01 00:23:16 -07:00
..
blog Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
config Updating scripts to use v1 instead of v1beta3 2015-07-01 00:23:16 -07:00
hugo Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
README.md Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07: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

Analytics