-
-
Notifications
You must be signed in to change notification settings - Fork 53
Description
https://yente.followthemoney.tech/deploy/ links straight to https://github.com/opensanctions/yente/blob/main/kubernetes.example.yml , so I think it's good to treat that YAML file as a docs page that people will read to understand how to use this in Kubernetes (also, people could always find it in the repo with no context). I tried to run this on a clean minikube install, and I made a few notes. There are some specific suggestions and a general suggestion at the end.
Helm repo missing
Use the ElasticSearch Kubernetes Operator:
helm upgrade --install elastic-operator elastic/eck-operator
--namespace elastic-system --create-namespace
This is missing the step of adding the Helm repository, and that could be added in:
james@laptop:~/tmp$ helm upgrade --install elastic-operator elastic/eck-operator --namespace elastic-system --create-namespace
Release "elastic-operator" does not exist. Installing it now.
Error: repo elastic not found
james@laptop:~/tmp$ helm repo add elastic https://helm.elastic.co
"elastic" has been added to your repositories
james@laptop:~/tmp$ helm upgrade --install elastic-operator elastic/eck-operator --namespace elastic-system --create-namespace
Release "elastic-operator" does not exist. Installing it now.
NAME: elastic-operator
LAST DEPLOYED: Sat Feb 14 08:58:51 2026
NAMESPACE: elastic-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Inspect the operator logs by running the following command:
kubectl logs -n elastic-system sts/elastic-operator
port-forward error
kubectl port-forward service/yente-index-es-http 9200 9200
This only needs 9200 once? Maybe 9300 was intended?
james@laptop:~/tmp$ kubectl -n yente port-forward service/yente-index-es-http 9200 9200
Forwarding from 127.0.0.1:9200 -> 9200
Forwarding from [::1]:9200 -> 9200
Unable to listen on port 9200: Listeners failed to create with the following errors: [unable to create listener: Error listen tcp4 127.0.0.1:9200: bind: address already in use unable to create listener: Error listen tcp6 [::1]:9200: bind: address already in use]
^Cjames@laptop:~/tmp$
james@laptop:~/tmp$
james@laptop:~/tmp$ kubectl -n yente port-forward service/yente-index-es-http 9200
Forwarding from 127.0.0.1:9200 -> 9200
Forwarding from [::1]:9200 -> 9200
https://kubernetes.io/docs/reference/kubectl/generated/kubectl_port-forward/
Storage class name is hardcoded
In the Elastic config:
storageClassName: premium-rwo
People will probably have to change that for their circumstances, so a comment pointing this out could be good. In minikube the default setup comes with one called `standard', for instance. Maybe it’s better to have this line commented out with a comment saying people may want to add it?
Index straight away
When first installed, there is no data. A note about that could help. They can either wait until the Cron job runs, or run it immediately:
kubectl create job --from=cronjob/yente-indexer yente-indexer-now
[ Tho note that command needs more work because the cron will kick of a concurrent indexer at the same time, which we want to avoid. ]
Order of actions & optional actions
Having the comments throughout the YAML can mislead people about what order things should be run in. Especially the 2 commented commands being together looks like they should be run together, but actually the order they should be run in is:
- Install Elastic Operator
- Apply this YAML (Will fail to set up Elastic if operator not installed, and it's difficult to install operator after the YAML has been applied)
- Run the port-forward command suggested (Will fail if Service doesn't exist, which it won't until YAML applied)
It could also be made clear the 3rd command is optional. An optional command could also be provided to access the API from outside the cluster.
General suggestion
How about a general comment block at the top, providing a general welcome, noting the order in which to do things, the optional follow ups, pointing out there are other comments throughout the YAML and pointing people to other help resources?