Cluster Configuration
k3s
The first and only kubernetes distribution I went with when configuring a new
cluster on my computers. This was fairly simple to configure and comes with
everything I needed to run my services. Traefik, CoreDNS, and Flannel are
some of the essential pods that are automatically configured. The network
backend was something I tinkered with for a long time as I believed there were
network performance issues with flannel. But it turns out due to the default
config of CoreDNS I was facing this, and any network backend could be used.
There was some small differences from other kubernetes distributions as k3s
does not follow the standard file layout.
Deploying a new cluster
These are the steps I currently follow when setting up a new cluster:
- Ensure the following are installed:
- Create the bitwarden auth token secret:
Apply it to the following namespaces:kubectl create secret generic bw-auth-token -n <YOUR_NAMESPACE> --from-literal=token="<TOKEN_HERE>"
- argocd
- kube-system
- default
- Create the github token secret:
Apply it to the following namespaces:kubectl create secret docker-registry ghcr-secret --docker-server=https://ghcr.io --docker-username=$YOUR_GITHUB_USERNAME --docker-password=$YOUR_GITHUB_TOKEN --docker-email=$YOUR_EMAIL -n <NAMESPACE>
- default
- Create Bitwarden Pods:
kubectl apply -f manifests/bitwarden/bitwarden.k8s.yaml
- Create necessary folders for applications to store persistent data
- Apply manifests for these apps:
kubectl apply -f manifests/traefik/traefik.k8s.yamlkubectl apply -f manifests/argocd/argocd.k8s.yamlkubectl apply -f manifests/application-set/application-set.k8s.yaml