Namespace, InfluxDB 2.7.12 StatefulSet with PVC and a NetworkPolicy that admits only the server, the server Deployment (non-root, read-only root filesystem), a cert-manager Certificate from letsencrypt-prod and a Traefik IngressRoute. Secrets are a template only. Nothing is applied; k8s/README.md has the steps. Server version bumped to 1.1.0. Validated offline with kustomize and kubeconform (including the cert-manager and Traefik CRD schemas). The InfluxDB container was tested locally as UID 1000 with no capabilities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.2 KiB
2.2 KiB
Kubernetes manifests — car.stinnesbeck.com
Plain manifests for the car server and its InfluxDB 2. They are only files: nothing here is applied automatically. Apply them yourself.
| File | What |
|---|---|
namespace.yaml |
Namespace mg4 |
influxdb.yaml |
InfluxDB 2.7.12 StatefulSet (10Gi PVC, default storage class), cluster-internal Service, NetworkPolicy allowing only the server |
server.yaml |
Server Deployment (1 replica, non-root, read-only root filesystem) and Service |
ingress.yaml |
cert-manager Certificate from letsencrypt-prod, Traefik IngressRoute on websecure |
secrets.example.yaml |
Template for the two Secrets; not in kustomization.yaml |
kustomization.yaml |
Everything except the Secrets; pins the server image tag |
Before the first apply
- Check the ingress class in
ingress.yaml. It is set totraefik-externalas a placeholder; use the class of your public-facing Traefik. - Create the Secrets. Copy
secrets.example.yamloutside the repository, replace everyCHANGE-ME(openssl rand -hex 32for tokens), then apply the copy:influxdb-auth(InfluxDB admin password and token) andmg4-server(ingest token, session secret, dashboard password, your ABRP API key and user token). - Registry access. If the
mg4-serverpackage on git.stinnesbeck.com is private, create thegit-stinnesbeck-registrypull secret (command insecrets.example.yaml); if it is public, deleteimagePullSecretsfromserver.yaml.
Apply
kubectl apply -f k8s/namespace.yaml
kubectl apply -f <your filled-in secrets file>
kubectl apply -k k8s/
The Let's Encrypt HTTP-01 challenge needs car.stinnesbeck.com to resolve to the public
Traefik before the certificate can be issued; check with kubectl -n mg4 get certificate.
Notes
- InfluxDB's setup mode runs only on an empty volume. Changing
admin-tokenin the Secret later does not change the token inside InfluxDB. - The server uses the InfluxDB admin token. A token scoped to the
mg4bucket can replace it later (influx auth create --read-bucket … --write-bucket …). - To upgrade the server, push a new image tag and change
newTaginkustomization.yaml.