...
1apiVersion: v1
2kind: ReplicationController
3metadata:
4 name: cassandra
5 # The labels will be applied automatically
6 # from the labels in the pod template, if not set
7 # labels:
8 # app: cassandra
9spec:
10 replicas: 2
11 # The selector will be applied automatically
12 # from the labels in the pod template, if not set.
13 # selector:
14 # app: cassandra
15 template:
16 metadata:
17 labels:
18 app: cassandra
19 spec:
20 containers:
21 - command:
22 - /run.sh
23 resources:
24 limits:
25 cpu: 0.5
26 env:
27 - name: MAX_HEAP_SIZE
28 value: 512M
29 - name: HEAP_NEWSIZE
30 value: 100M
31 - name: CASSANDRA_SEED_PROVIDER
32 value: "io.k8s.cassandra.KubernetesSeedProvider"
33 - name: POD_NAMESPACE
34 valueFrom:
35 fieldRef:
36 fieldPath: metadata.namespace
37 - name: POD_IP
38 valueFrom:
39 fieldRef:
40 fieldPath: status.podIP
41 image: gcr.io/google-samples/cassandra:v13
42 name: cassandra
43 ports:
44 - containerPort: 7000
45 name: intra-node
46 - containerPort: 7001
47 name: tls-intra-node
48 - containerPort: 7199
49 name: jmx
50 - containerPort: 9042
51 name: cql
52 volumeMounts:
53 - mountPath: /cassandra_data
54 name: data
55 volumes:
56 - name: data
57 emptyDir: {}
58
View as plain text