- Build the bundler image:
docker build ./bundler -t oba/bundler:test
- Build the app image:
docker build ./oba -t oba/app:test
Apply the Kubernetes resources in oba.yaml
kubectl apply -f oba.yaml
The YAML file deploys the OneBusAway application and a MySQL database within a dedicated oba namespace in Kubernetes. It also sets up a secret for sensitive data and a ConfigMap for GTFS data URL, while exposing the database as a service for other pods to access.
You can portforward the oba app to your localhost using:
kubectl port-forward deploy/oba-app-deployment -n oba 8080:8080
You can portforward the service to your localhost using:
kubectl port-forward service/oba-database -n oba 3306:3306
Then you can connect to it programmatically using mysql
:
mysql -u oba_user -p -h localhost:3306