Simple hugo static website for testing purposes
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
archetypes
content/posts
k8s
themes
README.md
config.toml

README.md

Hugo k8s Static Site Test

This is an example of a hugo site running in a kubernetes cluster. The site will be always refreshed from the contents in the master branch using Git Syc

Running in Minikube

Create service and pod

$ kubectl create -f k8s/pod.yaml
$ kubectl create -f k8s/service.yaml
$ kubectl create -f k8s/ingress.yaml

View results

The k8s ingress is configured to proxy to the service using port 80. At the same time, the hugo site is configured to use the "example.com" (configurable in the pod file) for navigation.

Get the minikube ip and map it to example.com in your /etc/hosts file

$ minikube ip
<your-minikube-ip>

on your /etc/hosts

<your-minikube-ip> example.com

note: you can change the name in the k8s/pod.yaml file

Now go to http://example.com, you should be able to see the example site