Created
December 23, 2023 03:27
-
-
Save vfarcic/50237ce00b935c2f8bc28d9f2cfe18d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://gist.github.com/vfarcic/c1c910f4164e061aa8e33796e8efca6e | |
# Source: https://gist.github.com/vfarcic/5d7ecbf28441325d77b6ef12c655867e | |
# Source: https://gist.github.com/vfarcic/95b680962ff2520c7f160eb9eb397325 | |
# Source: https://gist.github.com/vfarcic/1a25432a17dd2f9f15f07a4c9f2c3086 | |
# Source: https://gist.github.com/vfarcic/8dab7fbdcf1a36624d0483567662b39a | |
######### | |
# Setup # | |
######### | |
git clone https://github.com/vfarcic/kubeblocks-demo | |
cd kubeblocks-demo | |
helm install kubeblocks kubeblocks \ | |
--repo https://apecloud.github.io/helm-charts \ | |
--namespace kb-system --create-namespace --wait | |
kbcli kubeblocks status | |
kubectl create namespace a-team | |
########################################################### | |
# Run (Almost) Any Database in Kubernetes With KubeBlocks # | |
########################################################### | |
kbcli addon list | |
kubectl get clusterdefinition | |
kubectl get clusterversions | |
cat postgresql.yaml | |
kubectl --namespace a-team apply --filename postgresql.yaml | |
kubectl --namespace a-team get clusters.apps.kubeblocks.io | |
kubectl --namespace a-team \ | |
get all,secrets,rolebindings,serviceaccounts | |
kubectl --namespace a-team get secret \ | |
silly-demo-db-conn-credential --output yaml | |
kbcli cluster connect silly-demo-db --namespace a-team | |
\q | |
kbcli cluster edit-config silly-demo-db --namespace a-team | |
kbcli cluster configure silly-demo-db --set=max_connections=200 \ | |
--namespace a-team | |
kubectl --namespace a-team get cluster.apps.kubeblocks.io \ | |
silly-demo-db --output yaml | |
export PRIMARY_POD=silly-demo-db-postgresql-0 | |
kubectl --namespace a-team delete pod $PRIMARY_POD | |
kubectl --namespace a-team get cluster.apps.kubeblocks.io \ | |
silly-demo-db --output yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment