Local deployment of different vector databases using Minikube.
To install minikube check the docs
The configuration I'm using is the following:
Get the status
minikube statusStart Cluster
minikube startStop Cluster
minikube stopGet info about the nodes in your cluster
kubectl get nodes -o widedocs
minikube tunnelCreate a .env file to store your variables. You will need one per database, run the following to create it automatically
Generate pgvector .env file
cat > pgvector/.env << EOF
# PgVector
POSTGRES_DB=dbname
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
EOFDeployment scripts will create a secret per db referenced by the deployment.yml file
Important!!
Before you run any deployment script, check your .env files, if you want to use a different one just pass it to the script, by default it will use .env (Remember that each db has its own env file)
bash deploy_dbs.sh --env ".env_prod"or
bash deploy_dbs.sh -e ".env_prod"To deploy pgvector, use --pgvector flag
bash deploy_dbs.sh --pgvectordb_flag: --pgvector
bash deploy_dbs.sh --db_flag1 --db_flag2To get the external ip
kubectl get servicesif you don't see it, run:
minikube tunnelCheck if the db is accepting connections
pg_isready -d ${POSTGRES_DB} -h ${EXTERNAL_IP} -p 5432 -U ${POSTGRES_USER}Open a connection docs
psql -d ${POSTGRES_DB} -h ${EXTERNAL_IP} -p 5432 -U ${POSTGRES_USER}kubectl delete service pgvector &&
kubectl delete deployment pgvector &&
kubectl delete pv pgvector-pv &&
kubectl delete pvc pgvector-pvc &&
kubectl delete secret pgvector-secrets