Commit 16f516f8 authored by Paul Morie's avatar Paul Morie

Merge pull request #8099 from ddysher/fix-downward-api

Fix downward API
parents 962f10ee 91535827
apiVersion: v1beta3 apiVersion: v1beta3
kind: ReplicationController kind: ReplicationController
metadata: metadata:
labels: labels:
name: cassandra name: cassandra
name: cassandra name: cassandra
spec: spec:
replicas: 1 replicas: 1
selector: selector:
name: cassandra name: cassandra
template: template:
metadata: metadata:
labels: labels:
name: cassandra name: cassandra
spec: spec:
containers: containers:
- command: - command:
- /run.sh - /run.sh
resources: resources:
limits: limits:
cpu: 1 cpu: 1
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: "kubernetes/cassandra:v2" image: "kubernetes/cassandra:v2"
name: cassandra name: cassandra
ports: ports:
- containerPort: 9042 - containerPort: 9042
name: cql name: cql
- containerPort: 9160 - containerPort: 9160
name: thrift name: thrift
volumeMounts: volumeMounts:
- mountPath: /cassandra_data - mountPath: /cassandra_data
name: data name: data
volumes: volumes:
- name: data - name: data
emptyDir: {} emptyDir: {}
apiVersion: v1beta3 apiVersion: v1beta3
kind: Service kind: Service
metadata: metadata:
labels: labels:
name: cassandra name: cassandra
name: cassandra name: cassandra
spec: spec:
ports: ports:
- port: 9042 - port: 9042
targetPort: 9042 targetPort: 9042
selector: selector:
name: cassandra name: cassandra
...@@ -10,7 +10,7 @@ spec: ...@@ -10,7 +10,7 @@ spec:
- /run.sh - /run.sh
resources: resources:
limits: limits:
cpu: "1" cpu: "1"
image: kubernetes/cassandra:v2 image: kubernetes/cassandra:v2
name: cassandra name: cassandra
ports: ports:
...@@ -31,5 +31,3 @@ spec: ...@@ -31,5 +31,3 @@ spec:
volumes: volumes:
- name: data - name: data
emptyDir: {} emptyDir: {}
...@@ -14,7 +14,7 @@ started](../../docs/getting-started-guides) for installation instructions for yo ...@@ -14,7 +14,7 @@ started](../../docs/getting-started-guides) for installation instructions for yo
Containers consume the downward API using environment variables. The downward API allows Containers consume the downward API using environment variables. The downward API allows
containers to be injected with the name and namespace of the pod the container is in. containers to be injected with the name and namespace of the pod the container is in.
Use the `examples/secrets/secret-pod.yaml` file to create a Pod with a container that consumes the Use the `examples/downward-api/dapi-pod.yaml` file to create a Pod with a container that consumes the
downward API. downward API.
```shell ```shell
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment