Skip to content
/ k8s Public

My single-node Kubernetes cluster for all my projects!

License

Notifications You must be signed in to change notification settings

sgoudham/k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published