Running Hugo the Hard Way(Hugo + DO Kubernetes + LetsEncrypt) - Part 2 | Flepmfluanfnalal

February 5, 2019

Running Hugo the Hard Way(Hugo + DO Kubernetes + LetsEncrypt) - Part 2

If you’ve found this randomly, consider checking out Part 1 to see if this interests you.

Okay, so we have all the dependencies in place. Let’s do this.

Assuming you already have a static site, the next steps should be relatively straightforward. If this your first time with Hugo, check out the documentation here.

pushd site

# READ and MODIFY manifest.yaml
# This will not work out of the box
kubectl apply -f .

popd

manifest.yaml is heavily commented and requires some modifications to work. You will have to modify all references to domain.tld and work on how your content is made available to our pods. This exercise is intentionally hard but please reach out to me if you get stuck. I will do my best to help.

Again, now the cluster should look a lot different than before we started. Take a moment to inspect the cluster. List namespaces, pods, services, deployments, secrets, certificates. Building a good mental model is still important.

So if everything worked as intended, domain.tld should now resolve, SSL certificates served for https://domain.tld should be valid, and your content available at /. You did great! Time to celebrate.

Okay, so shit is still broken. Contact me.

© Kasisnu | Guy with long hair 2018