Last active
April 16, 2018 21:05
-
-
Save a-robinson/ec2b86783ccbf053c83ba83170673d63 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
# This service is meant to be used by clients of the database. It exposes a ClusterIP that will | |
# automatically load balance connections to the different database pods. | |
name: cockroachdb-public | |
labels: | |
app: cockroachdb | |
spec: | |
ports: | |
# The main port, served by gRPC, serves Postgres-flavor SQL, internode | |
# traffic and the cli. | |
- port: 26257 | |
targetPort: 26257 | |
name: grpc | |
# The secondary port serves the UI as well as health and debug endpoints. | |
- port: 8080 | |
targetPort: 8080 | |
name: http | |
selector: | |
app: cockroachdb | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: cockroachdb | |
labels: | |
app: cockroachdb | |
spec: | |
updateStrategy: | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
app: cockroachdb | |
spec: | |
hostNetwork: true | |
containers: | |
- name: cockroachdb | |
image: cockroachdb/cockroach:v2.0.0 | |
imagePullPolicy: IfNotPresent | |
ports: | |
- containerPort: 26257 | |
hostPort: 26257 | |
name: grpc | |
- containerPort: 8080 | |
hostPort: 8080 | |
name: http | |
volumeMounts: | |
- name: datadir | |
mountPath: /cockroach/cockroach-data | |
command: | |
- "/bin/bash" | |
- "-ecx" | |
- "exec /cockroach/cockroach start --logtostderr --insecure --http-host 0.0.0.0 --cache 25% --max-sql-memory 25% --join=10.128.0.4,10.128.0.5,10.128.0.3" | |
terminationGracePeriodSeconds: 30 | |
volumes: | |
- name: datadir | |
hostPath: | |
path: /tmp/cockroach-data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment