You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.6 KiB

Server Configuration

At the time of writing, I have a single 6 core VDS from NetCup that I use to host my personal projects. Initially, I started out with docker and having folders of compose files. I quickly ran into issues re-deploying multiple services at once, shoehorning traefik configuration into docker and various other tidbits here and there.

So I decided to bite the bullet and dive into the fabled/dreaded Kubernetes.

It's important to note that this is mostly for learning, a single node cluster isn't very effective and honestly makes things a lot harder in a lot of places compared to docker config. However, I'm fascinated at the fact that you can interact with a single node cluster the same way you'd do with hundreds of clusters, it's a pretty powerful abstraction!

Also, technically I'm using k3s for this single node cluster.

High-Level Architecture

server-architecture

Example Request

gitea-example-request

Useful Commands

  1. Get the Bearer Token

    kubectl -n <namespace> create token <user>
    
  2. Load in Environment Variables via .env (Although, based on this stackoverflow post, there is some odd behaviour with the command)

    kubectl create secret generic <secret-name> --from-env-file=.env
    
  3. Perform PVC Storage Expansion

    kubectl patch pvc <name> -p '{"spec":{"resources":{"requests":{"storage":"<amount>"}}}}'
    
  4. Annotation to Allow Secret to be Managed by Sealed Secrets

    annotations:
      sealedsecrets.bitnami.com/managed: "true"
    

Tools Used

Liked Resources

Acknowledgement

Sincere thanks to one of my best friends winston for helping me set up the cluster, troubleshoot configurations and taking the time to walk me through concepts. I really couldn't have done it this fast without him!

License

MIT