Skip to content

Instantly share code, notes, and snippets.

@martimors
Created May 24, 2022 15:01
Show Gist options
  • Save martimors/820fb75dda2e30c2e81419d43deecc06 to your computer and use it in GitHub Desktop.
Save martimors/820fb75dda2e30c2e81419d43deecc06 to your computer and use it in GitHub Desktop.
Run a single-node standalone non-root cockroachdb in kubernetes
---
apiVersion: v1
kind: Service
metadata:
name: cockroachdb
spec:
selector:
app: cockroachdb
type: ClusterIP
ports:
- name: cockroachdb
protocol: TCP
port: 26257
targetPort: cockroachdb
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cockroachdb
labels:
app: cockroachdb
spec:
selector:
matchLabels:
app: cockroachdb
replicas: 1
template:
metadata:
labels:
app: cockroachdb
spec:
containers:
- name: cockroachdb
image: cockroachdb/cockroach:v21.2.7
args:
- start-single-node
- --insecure
- --store
- path=/tmp/cockroach-data
resources:
requests:
cpu: 500m
memory: 500Mi
limits:
cpu: 500m
memory: 500Mi
ports:
- containerPort: 26257
name: cockroachdb
restartPolicy: Always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment