December Adventure: Exploring YAML

It’s full of whitespace

personal
december adventure
yaml
reverse proxy
traefik
vs code
Author

Shannon Quinn

Published

Posted on the 13th of December in the year 2024, at 4:19pm. It was Friday.

Two-paned meme image of Mark Hamill, with the first pane normal and the second pane showing indented blocks of Mark Hamill with the undertitle 'Mark Yaml'. Credit: https://www.reddit.com/r/ProgrammerHumor/comments/hwxsgi/ah_yes_mark_yaml/

Whew, that week went by in a flash. I’ve actually been working on this #DecemberAdventure project these past few days and have made some strides; I just kept running out of time (and inclination) to post about it.

Part of the problem—as an aside—is that I had to close the YAML project space in my VS Code editor in order to open the project space for writing a blog post, which makes it difficult to cross-reference very specific issues and instead relies on “vibes” for writing the post. I’m sure it’s to the detriment of any readers, but I enjoy being as specific as I can. If anyone wants to tell me the magic key combination that allows me to open up multiple project spaces simultaneously in VS Code, please do drop me a line.

Anyway, I hit upon a couple of crucial resources this past week that have helped me make some progress. First, I identified some very specific changes I need to make:

These are easy enough, only requiring some minor configuration tweaks to the yaml.

But I have a lot of deeper questions about the configuration involved in having Traefik route to external services.

But anyway. I tried to take a stab at it anyway, using this:

---
apiVersion: v1
kind: Service
metadata:
  name: unraid
  namespace: default
spec:
  type: ExternalName
  externalName: unraid.my.local.domain
  ports:
    - port: 80
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: unraid
  namespace: default
  annotations: 
    kubernetes.io/ingress.class: traefik
spec:
  entryPoints:
    - web
  routes:
    - match: Host(`unraid.my.local.domain`)
      kind: Rule
      services:
        - name: unraid
          namespace: default

No HTTPS, just regular ol’ port 80. And it worked… kind of. I got a 404 error.

After thinking about it for a couple minutes, I realized: right now I have my local DNS pointing unraid.my.local.domain to the IP address of the traefik proxy, NOT the actual Unraid server. Which I guess would explain the 404, right?

So then, here’s my biggest question: if I want to route all internal traffic through this proxy, but need the proxy to check with the external DNS server for the right IP address for the server… howwwww does that happen???

Citation

BibTeX citation:
@online{quinn2024,
  author = {Quinn, Shannon},
  title = {December {Adventure:} {Exploring} {YAML}},
  date = {2024-12-13},
  url = {https://magsol.github.io/2024-12-13-december-adventure-exploring-yaml},
  langid = {en}
}
For attribution, please cite this work as:
Quinn, Shannon. 2024. “December Adventure: Exploring YAML.” December 13, 2024. https://magsol.github.io/2024-12-13-december-adventure-exploring-yaml.