Prerequisites –
— VM like VirtualBox
— install minikube & kubectl (kubectl usually comes with minikube)
minikube version kubectl minikube start
— then
kubectl run pg1 --image=postgres:11.2
— make sure the pod is named pg1 and it is ready with kubectl get pods
kubectl get pods NAME READY STATUS RESTARTS AGE pg1 1/1 Running 0 84m
— once it is ready connect to it interactive
kubectl exec -it pg1 -- bash
— now you are in the pod/dockerd node start psql to connect – and voila!
psql -U postgres -p 5432 postgres
–Here’s one that shows you most of the steps for Postgres
https://www.starkandwayne.com/blog/the-tool-to-start-your-journey-with-kubernetes-minikube/
–Here’s another that is better on the linux install side
https://medium.com/devops-dudes/install-minikube-on-ubuntu-18-04-or-20-04-683ef8f27a8
–put the two together and you should be good