Created
May 24, 2022 15:01
-
-
Save martimors/820fb75dda2e30c2e81419d43deecc06 to your computer and use it in GitHub Desktop.
Run a single-node standalone non-root cockroachdb in kubernetes
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
--- | |
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