mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
| img | ||
| k3s | ||
| mssql | ||
| prole-db | ||
| src | ||
| cloudnative-pg-prole-dB.yaml | ||
| docker-root-prole-db.sh | ||
| LICENSE | ||
| README.md | ||
prole
PROLE
prole-db is a PostgreSQL database for Prole
claudnative-pg cluster setup
brew install kubernetes kubectl
brew install minikube kubectl
minikube start
eval $(minikube -p minikube docker-env)
minikube addons enable metrics-server
minikube addons enable registry
minikube tunnel &
or Rancher Desktop
unset DOCKER_HOST DOCKER_TLS_VERIFY DOCKER_DEFAULT_PLATFORM MINIKUBE_ACTIVE_DOCKERD DOCKER_CERT_PATH
export PATH="/Users/chrisfu/.rd/bin:$PATH"
start the docker image build registry
cd prole-db
docker run -d -p 5000:5000 --name prole-data-registry registry:2
docker network connect k3d-prole-data-cluster prole-data-registry
docker login k3d.localhost:5000
docker build -t prole-db:17.5-025 .
docker tag prole-db:17.5-025 k3d.localhost:5000/prole-db:17.5-025
docker push k3d.localhost:5000/prole-db:17.5-025
k3d image import prole-db:17.5-025 -c prole-data-cluster
kubectl apply --server-side -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.26/releases/cnpg-1.26.0.yaml
helm upgrade --install -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/docs/src/samples/monitoring/kube-stack-config.yaml prometheus-community prometheus-community/kube-prometheus-stack
kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/docs/src/samples/monitoring/prometheusrule.yaml
helm repo add cnpg-grafana https://cloudnative-pg.github.io/grafana-dashboards
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
kubectl apply -f cloudnative-pg-prole-dB.yaml
kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443 &
kubectl port-forward svc/prometheus-community-kube-prometheus 9090 &
kubectl port-forward svc/prometheus-community-grafana 3000:80 &
kubectl port-forward svc/prole-db-rw 5432:5432 --address 0.0.0.0 &
kubectl port-forward svc/prole-mssql-db 1433:1433 --address 0.0.0.0 &
kubectl cnpg status prole-db
kubectl cnpg plsql prole-db
brew install krew
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
kubectl krew install view-secret
re-initialise the database
kubectl delete -f cloudnative-pg-prole-dB.yaml
# cluster.postgresql.cnpg.io "prole-db" deleted
kubectl apply -f cloudnative-pg-prole-dB.yaml
# cluster.postgresql.cnpg.io/prole-db created