Self-hostingPlatforms
MicroK8s
Short version
Section titled "Short version"One machine with 2 CPU cores, 2 GB of memory at least and 4 GB for a busy instance, and 20 GB of free disk, and a domain that points at it. Install MicroK8s, turn on four addons and install the chart, in about 15 minutes.
What this changes
Section titled "What this changes"- MicroK8s, with its ingress controller on ports 80 and 443 of the node, CoreDNS, hostpath storage and cert-manager. The data is under
/var/on the node, and deleting the PersistentVolumeClaim deletes that data.snap/ microk8s/ common/ default-storage - A ClusterIssuer called
letsencrypt. - Fluxer in the
fluxernamespace, the same as on any cluster, with voice on host ports 7881 and 7882 of the MicroK8s node.
Before you start
Section titled "Before you start"Check the requirements. Open ports 80 and 443 on TCP, 7881 on TCP and 7882 on UDP in any firewall in front of the machine. Nothing else may use ports 80 and 443.
Install
Section titled "Install"-
Install MicroK8s and its addons, then give Helm the kubeconfig.
sudo snap install microk8s --classicsudo microk8s status --wait-readysudo microk8s enable dns hostpath-storage ingress cert-managersudo snap install helm --classicmkdir -p ~/.kube && sudo microk8s config > ~/.kube/ && chmod 600 ~/config .kube/ config sudo microk8s statuslists the four addons underenabled. Snap updates MicroK8s by itself, and the pod can restart when it does.sudo snap refresh --hold microk8sstops those updates until you update it yourself. -
Add a Let's Encrypt issuer that uses the
publicingress class.issuer.yaml apiVersion: cert-manager.io/v1 kind: ClusterIssuermetadata:name: letsencryptspec:acme:server: https://acme-v02.api.letsencrypt.org/ directory privateKeySecretRef:name: letsencryptsolvers:- http01:ingress:ingressClassName: publicApply it with
sudo microk8s kubectl apply -f issuer..yaml sudo microk8s kubectl get clusterissuershowsTrueunder READY. -
Install Fluxer.
helm install fluxer oci://ghcr.io/fluxerapp/ charts/ fluxer \ --namespace fluxer --create-namespace \--set domain=chat.example.com \--set ingress.className=public \ --set ingress.annotations."cert-manager\.io/cluster-issuer"=letsencrypt sudo microk8s kubectl -n fluxer rollout status statefulset/fluxer --timeout 15mIn MicroK8s 1.35 the ingress addon runs Traefik, with the IngressClasses
public,nginxandtraefik, and WebSockets need no annotations. Traefik ends an upload that takes longer than 60 seconds to arrive, so raise its read timeout for slow uploads.Older MicroK8s releases ran ingress-nginx. There, add these two lines to the
helm installcommand so uploads work.--set ingress.annotations."nginx\.ingress\.kubernetes\.io/proxy-body-size"=512m \ --set ingress.annotations."nginx\.ingress\.kubernetes\.io/proxy-read-timeout"=3600 The rollout prints
partitioned roll out complete, and about a minute later cert-manager has fetched a Let's Encrypt certificate for your domain. -
Print the setup token.
sudo microk8s kubectl -n fluxer exec fluxer-0 -- fluxerd setup-tokenOpen your domain and paste the token to create the first admin account.