Create namespace and install prerequisites:
kubectl create namespace btc
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install nginx-ingress ingress-nginx/ingress-nginx
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.8.0/cert-manager.crds.yaml
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace
Copy default values (edit secrets as needed):
cp deploy/values.yaml.example deploy/values.yml
Deploy the application stack:
helm install btcrate ./deploy --namespace btc
## Get the auth token
curl -k -X POST https://btcrate.myorg.com/login
curl -k -H "Authorization: <token>" https://btcrate.myorg.com/last | jq
curl -k -H "Authorization: <token>" https://btcrate.myorg.com/retrieve
{
"price_eur": 64209,
"price_czk": 1587099,
"retrieved_at": "2024-05-23T10:00:00.199Z",
"request_time": "2024-05-23T10:04:21.522Z"
}
- Copy
.env.example
to.env
and edit as needed docker-compose up -d --build