Merge pull request #10023 from ddysher/update-cassandra

Update cassandra example README to v1
This commit is contained in:
Satnam Singh 2015-06-18 11:41:23 -07:00
commit 8ecc75efb7
1 changed files with 5 additions and 10 deletions

View File

@ -16,7 +16,7 @@ This is a somewhat long tutorial. If you want to jump straight to the "do it no
In Kubernetes, the atomic unit of an application is a [_Pod_](../../docs/pods.md). A Pod is one or more containers that _must_ be scheduled onto the same host. All containers in a pod share a network namespace, and may optionally share mounted volumes. In this simple case, we define a single container running Cassandra for our pod: In Kubernetes, the atomic unit of an application is a [_Pod_](../../docs/pods.md). A Pod is one or more containers that _must_ be scheduled onto the same host. All containers in a pod share a network namespace, and may optionally share mounted volumes. In this simple case, we define a single container running Cassandra for our pod:
```yaml ```yaml
apiVersion: v1beta3 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
labels: labels:
@ -29,7 +29,7 @@ spec:
resources: resources:
limits: limits:
cpu: "0.5" cpu: "0.5"
image: gcr.io/google_containers/cassandra:v3 image: gcr.io/google_containers/cassandra:v4
name: cassandra name: cassandra
ports: ports:
- name: cql - name: cql
@ -44,8 +44,6 @@ spec:
value: 512M value: 512M
- name: HEAP_NEWSIZE - name: HEAP_NEWSIZE
value: 100M value: 100M
- name: KUBERNETES_API_PROTOCOL
value: http
volumes: volumes:
- name: data - name: data
emptyDir: {} emptyDir: {}
@ -76,7 +74,7 @@ In Kubernetes a _[Service](../../docs/services.md)_ describes a set of Pods that
Here is the service description: Here is the service description:
```yaml ```yaml
apiVersion: v1beta3 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
labels: labels:
@ -85,7 +83,6 @@ metadata:
spec: spec:
ports: ports:
- port: 9042 - port: 9042
targetPort: 9042
selector: selector:
name: cassandra name: cassandra
``` ```
@ -134,7 +131,7 @@ In Kubernetes a _[Replication Controller](../../docs/replication-controller.md)_
Replication Controllers will "adopt" existing pods that match their selector query, so let's create a Replication Controller with a single replica to adopt our existing Cassandra Pod. Replication Controllers will "adopt" existing pods that match their selector query, so let's create a Replication Controller with a single replica to adopt our existing Cassandra Pod.
```yaml ```yaml
apiVersion: v1beta3 apiVersion: v1
kind: ReplicationController kind: ReplicationController
metadata: metadata:
labels: labels:
@ -157,12 +154,10 @@ spec:
cpu: 0.5 cpu: 0.5
env: env:
- name: MAX_HEAP_SIZE - name: MAX_HEAP_SIZE
key: MAX_HEAP_SIZE
value: 512M value: 512M
- name: HEAP_NEWSIZE - name: HEAP_NEWSIZE
key: HEAP_NEWSIZE
value: 100M value: 100M
image: "gcr.io/google_containers/cassandra:v3" image: gcr.io/google_containers/cassandra:v4
name: cassandra name: cassandra
ports: ports:
- containerPort: 9042 - containerPort: 9042