Deploying using docker-compose:
- Create an environment variable API_KEY for NASA API token in
.env
file in the root directory of the repository.
Eg:API_KEY=<your nasa api token>
- Run the command:
docker-compose -f docker-compose.yaml up
Use the APIs:
- http://localhost:5000/
- http://localhost:5000/neos
- http://localhost:5000/neo/week
- http://localhost:5000/neo/next?hazardous=true
Deploying in kubernetes:
- Run the following commands from the root directory of the repository:
kubectl apply -f k8-deployment/pv-volume.yaml
kubectl apply -f k8-deployment/pv-claim.yaml
kubectl apply -f k8-deployment/server-secret.yaml
kubectl apply -f k8-deployment/server-deployment.yaml
- Run the command:
minikube service flask-service
to access the APIs.
Use the APIs:
- http://<host_ip>:30000/
- http://<host_ip>:30000/neos
- http://<host_ip>:30000/neo/week
- http://<host_ip>:30000/neo/next?hazardous=true
Deployment using helm chart:
- Run the command from root directory of the repo:
helm install < deployment name > helm
- Run the command:
minikube service flask-service
to access the APIs.
Note: The images are pulled from a private repository. So deployment using helm will fail