Run Feedbin in your local Kubernetes cluster
Von Carsten
After listening to the Changelog Podcast, episode 240 today I wanted to run Feedbin in a local kubernetes cluster. I’ll skip the installation of kubernetes for now, but you can read about setting kubernetes up with minikube elsewhere. For this short article, I’ll just describe the commands that are needed to get a first version of Feedbin up and running in your local cluster.
First of all, create a Postgres database:
kubectl run postgres --image=postgres --port=5432
kubectl expose service postgres --type=NodePort
Because this is purely for demonstration, I’m not setting a custom postgres username nor password. Don’t do this if you want to run Feedbin for real.
The first command actually created the container to run postgres, the second command created a kubernetes service for it. From the docs:
A Kubernetes Service is an abstraction which defines a logical set ofPods and a policy by which to access them - sometimes called a micro-service. The set of Pods targeted by a Service is (usually) determined by a Label Selector (see below for why you might want a Service without a selector).
As an example, consider an image-processing backend which is running with 3 replicas. Those replicas are fungible - frontends do not care which backend they use. While the actual Pods that compose the backend set may change, the frontend clients should not need to be aware of that or keep track of the list of backends themselves. The Service abstraction enables this decoupling.
So now we have a postgres service which can be used by other pods in the cluster. You can always check the status of your pods with the following command:
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
postgres-1342422565-hzgx9 1/1 Running 0 1m
Next is running Feedbin and I’m using an existing docker image scavone/feedbin:
kubectl run feedbin --image=scavone/feedbin --port=9292 --env POSTGRES_USERNAME=postgres --env POSTGRES=postgres --env POSTGRES_PASSWORD=
kubectl expose deployment feedbin --type=NodePort
Using minikube you can now open a browser for your Feedbin installation:
minikube service feedbin
This should open your default browser and show the Feedbin login.