I'm using VSCode and an devcontainer. Since I have a lot of different projects it's really easy to use container pre-build for each project. I have attached the .devcontainer with the source files. Try it. It works great.
There are so many ways to install and configure a kubernetes cluster on Pi 4.
- K3s with Ansbile See my repo: https://github.com/olafkfreund/ansible-k3s-rpi
- Installed k3s
- configured SSD disk and mounted on "/mnt/disk01"
- installed and configured nfs share and clients
- All code is in base
- common: namespace and ingress definition
- media: different media services that I use on my cluster.
- system: dashboard, cert-manager, metallb, nginx and Volumes
Add system services like: nginx, metallb and Volumes.
kubectl apply -k ./system/
Add media services
kubectl apply -k ./base/media/
Add Ingress
kubectl apply -k ./base/common/
- 03-metallb-config.yaml: Change the address-pools config.
- persistentvolume.yaml path file to what ever You are using.
Get a claim token
Obtain a Plex Claim Token by visiting plex.tv/claim. You need to create an account if you haven't already one yet.
This will be used to bind your new PMS instance to your own user account automatically.
kubectl create secret generic openvpn \
--from-literal username=<VPN_USERNAME> \
--from-literal password=<VPN_PASSWORD> \
--namespace media
Create a file credentials.conf into the folder /mnt/disk01/configs/jackett/openvpn/ composed of two line (first one: username and second one password)
<VPN_USERNAME>
<VPN_PASSWORD>
Create the following directory structure on your SSD
$ mkdir -p /mnt/disk01/media/configs/jackett/Jackett/
Create the file ServerConfig.json into the folder /mnt/disk01/media/configs/jackett/Jackett/ with the following content:
{
"BasePathOverride": "/jackett"
}
Create the following directory structure on your SSD
$ mkdir -p /mnt/disk01/media/configs/sonarr/
Create the file config.xml into the folder /mnt/disk01/media/configs/sonarr/ with the following content:
<Config>
<UrlBase>/sonarr</UrlBase>
</Config>
Create the following directory structure on your SSD
$ mkdir -p /mnt/disk01/media/configs/radarr/
Create the file config.xml into the folder /mnt/disk01/media/configs/radarr/ with the following content:
<Config>
<UrlBase>/radarr</UrlBase>
</Config>
Create the following directory structure on your SSD
$ mkdir -p /mnt/disk01/media/configs/bazarr/
Create the file config.xml into the folder /mnt/disk01/media/configs/radarr/ with the following content:
<Config>
<UrlBase>/bazarr</UrlBase>
</Config>