git-sync/demo
mattjmcnaughton 94c7154683 Update kubernetes demo/config for example
A couple of changes to make the kubernetes config work
and follow best practices.

- Use `deployment` instead of `pod`.
- Use correct image names.

After these changes, running `kubectl create -f demo/config/` creates a
working deployment/service.
2018-06-06 10:04:22 -07:00
..
blog Scrub 'contrib' 2016-08-20 14:17:17 -07:00
config Update kubernetes demo/config for example 2018-06-06 10:04:22 -07:00
hugo Scrub 'contrib' 2016-08-20 14:17:17 -07:00
README.md Update kubernetes demo/config for example 2018-06-06 10:04:22 -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 demo containers (Optional)

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

If you end up using a different registry, be sure to update config/deployment.yaml.

Create the pod and the service for the blog

kubectl create -f config

Open the service external ip in your browser

Analytics