Miniflux is one of my sponsored projects - a project I financially support on a regular basis because of its utility to me. Although I get to process my RSS feeds less frequently than I'd like to!
I've reviewed Miniflux in detail on my blog, but features (among many) that I appreciate:
- Compatible with the Fever API, read your feeds through existing mobile and desktop clients (This is the killer feature for me. I hardly ever read RSS on my desktop, I typically read on my iPhone or iPad, using Fiery Feeds or my new squeeze, Unread)
- Send your bookmarks to Pinboard, Wallabag, Shaarli or Instapaper (I use this to automatically pin my bookmarks for collection on my blog)
- Feeds can be configured to download a "full" version of the content (rather than an excerpt)
- Use the Bookmarklet to subscribe to a website directly from any browsers
2.0+ is a bit different
Some things changed when Miniflux 2.0 was released. For one thing, the only supported database is now postgresql (no more SQLite). External themes are gone, as is PHP (in favor of golang). It's been a controversial change, but I'm keen on minimal and single-purpose, so I'm still very happy with the direction of development. The developer has laid out his opinions re the decisions he's made in the course of development.
- A Kubernetes Cluster including Traefik Ingress
- A DNS name for your miniflux instance (miniflux.example.com, below) pointing to your load balancer, fronting your Traefik ingress
Prepare traefik for namespace¶
When you deployed Traefik via the helm chart, you would have customized
values.yml for your deployment. In
values.yml is a list of namespaces which Traefik is permitted to access. Update
values.yml to include the miniflux namespace, as illustrated below:
1 2 3 4 5 6 7 8
If you've updated
values.yml, upgrade your traefik deployment via helm, by running
helm upgrade --values values.yml traefik stable/traefik --recreate-pods
Create data locations¶
Although we could simply bind-mount local volumes to a local Kubuernetes cluster, since we're targetting a cloud-based Kubernetes deployment, we only need a local path to store the YAML files which define the various aspects of our Kubernetes deployment.
We use Kubernetes namespaces for service discovery and isolation between our stacks, so create a namespace for the miniflux stack with the following .yml:
1 2 3 4 5 6 7
Create persistent volume claim¶
Persistent volume claims are a streamlined way to create a persistent volume and assign it to a container in a pod. Create a claim for the miniflux postgres database:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
What's that annotation about?
The annotation is used by k8s-snapshots to create daily incremental snapshots of your persistent volumes. In this case, our volume is snapshotted daily, and copies kept for 7 days.
It's not always desirable to have sensitive data stored in your .yml files. Maybe you want to check your config into a git repository, or share it. Using Kubernetes Secrets means that you can create "secrets", and use these in your deployments by name, without exposing their contents. Run the following, replacing
imtoosexyformyadminpassword, and the
mydbpass value in both postgress-password.secret and database-url.secret:
1 2 3 4 5 6 7 8
Because. See my blog post here for the pain of hunting invisible newlines, that's why!
Create db deployment¶
Deployments tell Kubernetes about the desired state of the pod (which it will then attempt to maintain). Create the db deployment by excecuting the following. Note that the deployment refers to the secrets created above.
I share (with my patreon patrons) a private "premix" git repository, which includes necessary .yml files for all published recipes. This means that patrons can launch any recipe with just a
git pull and a
kubectl create -f *.yml 👍
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
Create app deployment¶
Create the app deployment by excecuting the following. Again, note that the deployment refers to the secrets created above.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
Check that your deployment is running, with
kubectl get pods -n miniflux. After a minute or so, you should see 2 "Running" pods, as illustrated below:
1 2 3 4 5
Create db service¶
The db service resource "advertises" the availability of PostgreSQL's port (TCP 5432) in your pod, to the rest of the cluster (constrained within your namespace). It seems a little like overkill coming from the Docker Swarm's automated "service discovery" model, but the Kubernetes design allows for load balancing, rolling upgrades, and health checks of individual pods, without impacting the rest of the cluster elements.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Create app service¶
The app service resource "advertises" the availability of miniflux's HTTP listener port (TCP 8080) in your pod. This is the service which will be referred to by the ingress (below), so that Traefik can route incoming traffic to the miniflux app.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Check that your services are deployed, with
kubectl get services -n miniflux. You should see something like this:
1 2 3 4 5
The ingress resource tells Traefik what to forward inbound requests for miniflux.example.com to your service (defined above), which in turn passes the request to the "app" pod. Adjust the config below for your domain.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Check that your service is deployed, with
kubectl get ingress -n miniflux. You should see something like this:
1 2 3 4
At this point, you should be able to access your instance on your chosen DNS name (i.e. https://miniflux.example.com)
To look at the Miniflux pod's logs, run
kubectl logs -n miniflux <name of pod per above> -f. For further troubleshooting hints, see Troubleshooting.
Tip your waiter (support me) 👏¶
Did you receive excellent service? Want to make your waiter happy? (..and support development of current and future recipes!) See the support page for (free or paid) ways to say thank you! 👏