mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
2.8 KiB
2.8 KiB
prole
# ###########################
# ╭──────────────────────╮ #
# │ _ │ #
# │ _ __ _ _ ___| |___ │ #
# │ | '_ \ '_/ _ \ / -_) │ #
# │ | .__/_| \___/_\___| │ #
# │ |_| │ #
# ╰──────────────────────╯ #
# ###########################
prole-db is a PostgreSQL database for Prole
claudnative-pg cluster setup
k3d
k3d cluster create ... k3d cluster create prole-service-cluster -a 2 --registry-create k8s-prole-org-registry:k8s.prole.org:5000 --timestamps
start the docker image build registry
build prole-db Docker image
cd prole-db
docker build -t prole-db:17.5-027 .
docker tag prole-db:17.5-027 localhost:5000/prole-db:17.5-027
docker push localhost:5000/prole-db:17.5-027
k3d image import prole-db:17.5-027 -c prole-service-cluster
# vim ~/.docker/daemon.json
# "insecure-registries": [ "k3.localhost:5000", "k8s.prole.org:5000" ]
kubectl apply --server-side -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.27/releases/cnpg-1.27.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 prometheus-community https://prometheus-community.github.io/helm-charts
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 port-forward svc/prometheus-community-kube-prometheus 9090 &
kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443 &
kubectl port-forward svc/prole-db-rw 5432:5432 --address 0.0.0.0 &
kubectl port-forward svc/prometheus-community-grafana 3000:80 --address 0.0.0.0 &
kubectl cnpg status prole-db
kubectl cnpg psql prole-db
brew install krew
kubectl krew install view-secret
Install from the cert-manager release manifest
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.1/cert-manager.yaml
install cmctl
brew install cmctl
cmctl check api
Install Barman-Cloud backup
kubectl apply -f https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v0.8.0/manifest.yaml