Eric Dobbs eaa86fd867 Simplify persistence configuration & expose macos folders
We now map ~/.wiki-k8s in MacOS into the .wiki folder inside the
container and similarly with MacOS ~/workspace/fedwiki

First, when we create the k3d cluster, we include directives that are
passed through to docker to mount the MacOS directories into the
kubernetes host.

Second, we use hostPath volumes in the kubernetes deployment config.

These will work great for the primary use case of a local wiki.
Deployments to remote kubernetes clusters will want to do this with
the PersistentVolumeClaim that was removed with this change.

One luxury of using hostPath and the legacy_security is that we no
longer require an init container.
2020-01-12 19:29:41 -07:00
..

Wiki Farm in Kubernetes

There are easier ways to get started with federated wiki. Here we are using wiki to drive some learning about kubernetes.

We're using MacOS, Docker Desktop, and k3d

brew cask install docker
brew install k3d

mkdir -p ~/.wiki-k8s ~/workspace/fedwiki
k3d create \
  --publish 80:80 \
  -v "$HOME/.wiki-k8s:/macos/.wiki-k8s" \
  -v "$HOME/workspace/fedwiki:/macos/fedwiki" \
  --name wiki

Deploy Wiki

kubectl apply -f wiki.yaml

Play with the wiki

open http://simple.localtest.me