k3s
Short version
Заголовок раздела «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. Installing k3s, cert-manager and the chart takes about 15 minutes from start to finish.
What this changes
Заголовок раздела «What this changes»- k3s, with its Traefik ingress controller on ports 80 and 443 and its local-path storage. local-path keeps the data in
/var/lib/rancher/k3s/storageon the node, and deleting the claim deletes the data.helm uninstallleaves the claim in place. - cert-manager in the
cert-managernamespace, with a ClusterIssuer calledletsencryptthat uses Let’s Encrypt. - Squad in the
fluxernamespace, the same as on any cluster, with voice on host ports 7881 on TCP and 7882 on UDP of the node.
Before you start
Заголовок раздела «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. Install Helm.
Install
Заголовок раздела «Install»-
Install k3s.
Окно терминала curl -sfL https://get.k3s.io | sh -mkdir -p ~/.kube && sudo cat /etc/rancher/k3s/k3s.yaml > ~/.kube/config && chmod 600 ~/.kube/configAfter a few seconds,
kubectl get nodesshows the node asReady. -
Install cert-manager and a Let’s Encrypt issuer that uses Traefik for its challenges.
Окно терминала helm install cert-manager oci://quay.io/jetstack/charts/cert-manager \-n cert-manager --create-namespace --set crds.enabled=true --waitissuer.yaml apiVersion: cert-manager.io/v1kind: ClusterIssuermetadata:name: letsencryptspec:acme:server: https://acme-v02.api.letsencrypt.org/directoryprivateKeySecretRef:name: letsencryptsolvers:- http01:ingress:ingressClassName: traefikApply it with
kubectl apply -f issuer.yaml.kubectl get clusterissuerthen showsTrueunder READY for the issuer. -
Give Traefik ten minutes to receive each request, so large uploads on a slow connection finish. Traefik 3 gives each request 60 seconds by default.
traefik-config.yaml apiVersion: helm.cattle.io/v1kind: HelmChartConfigmetadata:name: traefiknamespace: kube-systemspec:valuesContent: |-ports:web:transport:respondingTimeouts:readTimeout: 600swebsecure:transport:respondingTimeouts:readTimeout: 600sApply it with
kubectl apply -f traefik-config.yaml, and k3s then restarts Traefik with the longer read timeout on both of its ports. -
Install Squad.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
Traefik in k3s needs no extra annotations on the Ingress, and the Traefik config from step 3 gives slow uploads ten minutes to finish.
The rollout ends with
partitioned roll out complete, andkubectl -n fluxer get certificateshows the certificate as ready about a minute later. -
Print the setup token.
Окно терминала kubectl -n fluxer exec fluxer-0 -- fluxerd setup-tokenOpen your domain and paste the token to create the first admin account.
More than one node
Заголовок раздела «More than one node»With more than one node, the voice ports open on whichever node runs the pod. Pin the pod to a node with nodeSelector, or use voice.expose=loadBalancer with ServiceLB.