This is an old revision of the document!
MiniKube
- download
paru -S kubectl minikube kompose
Install Minikube
https://minikube.sigs.k8s.io/docs/start/
Install minikube
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo install minikube-linux-amd64 /usr/local/bin/minikube
Install Kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
minikube start
Run PostgreSQL server and Pgadmin on minikube
Deploy Postgres
- Create configuration file (.yaml)
- kubectl apply -f <filename.yaml>
- Create PersistenVolumeClaim file (.yaml)
- kubectl apply -f <filename.yaml>
- Create deployment file (.yaml)
- kubectl apply -f <filename.yaml>
- Create service file (.yaml)
- kubectl apply -f <filename.yaml>
Deploy Pgadmin
https://www.enterprisedb.com/blog/how-deploy-pgadmin-kubernetes
- Create configuration file (.yaml)
- kubectl apply -f <filename.yaml>
- Create service file (.yaml)
- kubectl apply -f <filename.yaml>
- Create StatefulSet file (.yaml)
- kubectl apply -f <filename.yaml>
Connect pgadmin to server
minikube service <NamePgadminService>
- Login Pgadmin
- Server –> Properties
- Change host name/address to Postgres service name
- Change username to one set in postgres config file
- Change port (if not default) to ContainerPort (not Minikube service port)
- Connect to server