forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example of a cassandra daemonset.
Introduce examples explaining how to use DataSets to optimally distribute cassandra nodes onto each kubernetes node in the network. Signed-off-by: Christian Stewart <christian@paral.in>
- Loading branch information
Showing
3 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: DaemonSet | ||
metadata: | ||
labels: | ||
name: cassandra | ||
name: cassandra | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
name: cassandra | ||
spec: | ||
# Filter to specific nodes: | ||
# nodeSelector: | ||
# app: cassandra | ||
containers: | ||
- command: | ||
- /run.sh | ||
env: | ||
- name: MAX_HEAP_SIZE | ||
value: 512M | ||
- name: HEAP_NEWSIZE | ||
value: 100M | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
image: "gcr.io/google_containers/cassandra:v6" | ||
name: cassandra | ||
ports: | ||
- containerPort: 9042 | ||
name: cql | ||
- containerPort: 9160 | ||
name: thrift | ||
resources: | ||
request: | ||
cpu: 0.1 | ||
volumeMounts: | ||
- mountPath: /cassandra_data | ||
name: data | ||
volumes: | ||
- name: data | ||
hostPath: | ||
path: /var/lib/cassandra |
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