I have created a pod to deploy valhalla-server, yaml below:
apiVersion: v1
kind: Pod
metadata:
name: valahalla-pod
labels:
app: valahalla-app-pod # Updated label name
spec:
containers:
- name: docker-valahalla
image: ghcr.io/gis-ops/docker-valhalla/valhalla
env:
- name: tile_urls
value: "https://download.geofabrik.de/europe/andorra-latest.osm.pbf ghcr.io/gis-ops/docker-valhalla/valhalla:latest"
ports:
- containerPort: 8002
volumeMounts:
- name: my-local-folder
mountPath: /custom_files
volumes:
- name: my-local-folder
hostPath:
path: /home/ubuntu/custom_files
When I exec into this pod, I am able to access the valhalla server on localhost on port 8002. But I have created a service for the pod, yaml below:
apiVersion: v1
kind: Service
metadata:
name: valahalla-service
spec:
selector:
app: valahalla-app-pod
ports:
- protocol: TCP
port: 80 # Port exposed by the service
targetPort: 8002
type: NodePort
I am not able to access my application through this! It gives output when I curl by going into the pod but not when I try to access it from outisde.
I am using EKS on AWS for this.
I was using deployment before, I've tried using pod instead and changed service from clusterIP to NodePort.