This is a simplified version of the configs found in the Vitess repo: https://github.com/youtube/vitess/tree/master/examples/kubernetes Here we use a single script to start all of Vitess, since the aim is just to show the end result. The full tutorial on our site goes into much more detail on each step: http://vitess.io/getting-started/
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
kind: ReplicationController
|
|
apiVersion: v1
|
|
metadata:
|
|
name: vtctld
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
component: vtctld
|
|
app: vitess
|
|
spec:
|
|
containers:
|
|
- name: vtctld
|
|
image: vitess/lite:v2.0
|
|
volumeMounts:
|
|
- name: syslog
|
|
mountPath: /dev/log
|
|
- name: vtdataroot
|
|
mountPath: /vt/vtdataroot
|
|
resources:
|
|
limits:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
command:
|
|
- sh
|
|
- "-c"
|
|
- >-
|
|
mkdir -p $VTDATAROOT/tmp &&
|
|
chown -R vitess /vt &&
|
|
su -p -c "/vt/bin/vtctld
|
|
-debug
|
|
-templates $VTTOP/go/cmd/vtctld/templates
|
|
-web_dir $VTTOP/web/vtctld
|
|
-log_dir $VTDATAROOT/tmp
|
|
-alsologtostderr
|
|
-port 15000
|
|
-topo_implementation etcd
|
|
-tablet_protocol grpc
|
|
-etcd_global_addrs http://$ETCD_GLOBAL_SERVICE_HOST:$ETCD_GLOBAL_SERVICE_PORT" vitess
|
|
volumes:
|
|
- name: syslog
|
|
hostPath: {path: /dev/log}
|
|
- name: vtdataroot
|
|
emptyDir: {}
|