Update cassandra tutorial (#7478)
This commit is contained in:
committed by
k8s-ci-robot
parent
5ec5118445
commit
d432d6bafe
@@ -11,9 +11,9 @@ Deploying stateful distributed applications, like Cassandra, within a clustered
|
|||||||
|
|
||||||
**Cassandra Docker**
|
**Cassandra Docker**
|
||||||
|
|
||||||
The Pods use the [`gcr.io/google-samples/cassandra:v12`](https://github.com/kubernetes/examples/blob/master/cassandra/image/Dockerfile)
|
The Pods use the [`gcr.io/google-samples/cassandra:v13`](https://github.com/kubernetes/examples/blob/master/cassandra/image/Dockerfile)
|
||||||
image from Google's [container registry](https://cloud.google.com/container-registry/docs/).
|
image from Google's [container registry](https://cloud.google.com/container-registry/docs/).
|
||||||
The docker is based on `debian:jessie` and includes OpenJDK 8. This image includes a standard Cassandra installation from the Apache Debian repo. By using environment variables you can change values that are inserted into `cassandra.yaml`.
|
The docker image above is based on [debian-base](https://github.com/kubernetes/kubernetes/tree/master/build/debian-base) and includes OpenJDK 8. This image includes a standard Cassandra installation from the Apache Debian repo. By using environment variables you can change values that are inserted into `cassandra.yaml`.
|
||||||
|
|
||||||
| ENV VAR | DEFAULT VALUE |
|
| ENV VAR | DEFAULT VALUE |
|
||||||
| ------------- |:-------------: |
|
| ------------- |:-------------: |
|
||||||
|
|||||||
@@ -15,9 +15,10 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: cassandra
|
app: cassandra
|
||||||
spec:
|
spec:
|
||||||
|
terminationGracePeriodSeconds: 1800
|
||||||
containers:
|
containers:
|
||||||
- name: cassandra
|
- name: cassandra
|
||||||
image: gcr.io/google-samples/cassandra:v12
|
image: gcr.io/google-samples/cassandra:v13
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 7000
|
- containerPort: 7000
|
||||||
@@ -42,7 +43,10 @@ spec:
|
|||||||
lifecycle:
|
lifecycle:
|
||||||
preStop:
|
preStop:
|
||||||
exec:
|
exec:
|
||||||
command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"]
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- nodetool drain
|
||||||
env:
|
env:
|
||||||
- name: MAX_HEAP_SIZE
|
- name: MAX_HEAP_SIZE
|
||||||
value: 512M
|
value: 512M
|
||||||
@@ -56,8 +60,6 @@ spec:
|
|||||||
value: "DC1-K8Demo"
|
value: "DC1-K8Demo"
|
||||||
- name: CASSANDRA_RACK
|
- name: CASSANDRA_RACK
|
||||||
value: "Rack1-K8Demo"
|
value: "Rack1-K8Demo"
|
||||||
- name: CASSANDRA_AUTO_BOOTSTRAP
|
|
||||||
value: "false"
|
|
||||||
- name: POD_IP
|
- name: POD_IP
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
|
|||||||
Reference in New Issue
Block a user