industrial project
This repo contains the yaml files required to deploy a postgres database fo use with an OpenNMS deployment.
Requirements:
Minikube and Kubectl configured for Docker Desktop
To use:
- Clone the repo to the IDE of your choice
- Ensure docker is running:
minikube start --driver docker - Run the following commands in the terminal:
kubectl apply -f postgres-configmap.yaml;
kubectl apply -f postgres-storage.yaml;
kubectl apply -f postgres-deployment.yaml;
kubectl apply -f postgres-service.yaml; - Display the pod information using:
kubectl get all - Note the pod name and the service/postgres port
- Run the command:
kubectl exec -it [pod-name] -- psql -h localhost -U admin --password -p [port] postgresdb
With the pod-name and port being what was recoded in step 5 - Enter the password defined in postgres-configmap.yaml