metalmatze / kube-cockroachdb Goto Github PK
View Code? Open in Web Editor NEWDeploy CockroachDB on Kubernetes using YAML or an Operator
License: Apache License 2.0
Deploy CockroachDB on Kubernetes using YAML or an Operator
License: Apache License 2.0
I've created some recording and alerting rules based on the metrics we get when monitoring a CockroachDB instance.
Going forward I want to add these as a mixin the project and then even utilize them in the generated YAML and Operator to even apply them as PrometheusRule resources to the cluster.
Dashboards need to be applied manually or imported via jsonnet.
Trying to use this on minikube on arm64 (m1 max) and it doesn't work as there are no arm64 images.
It'd be helpful to schedule cockroach cluster to specified node pools only:
https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity
There is currently no way to set the service account of the cockroachdb pods managed by kube-cockroachdb.
It's rather tiresome to keep writing kubectl get cockroachdb
, it would be neat to have a shortname in the CRD.
Maybe cdb
? Or crdb
?
Happy to add when agreed on a name.
On one of my projects I've created a Kubernetes CronJob to automatically backup databases to S3-compatible object storage (with minio).
Going forward this should become a part of kube-cockroachdb.
We need to parameterize a few things, like schedule and secrets, to make it really work for most people.
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: cockroachdb-backup
namespace: app
spec:
schedule: "0 */12 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v20.1.0
command:
- /bin/bash
- -ecx
- exec /cockroach/cockroach dump --url $DSN app > /backups/app.sql
env:
- name: DSN
valueFrom:
secretKeyRef:
key: DSN
name: app
volumeMounts:
- name: backups
mountPath: /backups
- name: minio
image: minio/mc:RELEASE.2020-04-04T05-28-55Z
command:
- /bin/sh
- -c
- sleep 10 && mc cp /backups/app.sql app-$(date +%Y-%m-%d-%H-%M-%S).sql
env:
- name: MC_HOST_digitalocean
value: 'https://[email protected]'
volumeMounts:
- name: backups
mountPath: /backups
volumes:
- name: backups
emptyDir: {}
restartPolicy: OnFailure
Please add a reaction to indicate you want this feature and leave a comment for other requirements around this feature.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.